[Bug stdio/33183] FAIL: ./debug/tst-sprintf-fortify-rdonly-static
danglin at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Sun Jul 20 18:41:05 GMT 2025
https://sourceware.org/bugzilla/show_bug.cgi?id=33183
--- Comment #6 from John David Anglin <danglin at gcc dot gnu.org> ---
It seems check_relro fails and returns readonly_area_writable:
(gdb) frame 1
#1 _dl_readonly_area (ptr=0xb93b8 <writeable_format>, size=9)
at dl-readonly-area.c:66
66 return check_relro (l, ptr_start, ptr_end);
(gdb) p from
$11 = 753664
(gdb) p/x from
$12 = 0xb8000
(gdb) p/x to
$13 = 0xbd000
(gdb) p/x ptr_start
$14 = 0xb93b8
(gdb) p/x ptr_end
$15 = 0xb93c1
(gdb) p ph->p_flags
$16 = 6
dave@mx3210:/proc/22242$ cat maps
00010000-000b8000 r-xp 00000000 103:01 47767909
/home/dave/gnu/glibc/objdir/debug/tst-sprintf-fortify-rdonly-static
000b8000-000bd000 rw-p 000a8000 103:01 47767909
/home/dave/gnu/glibc/objdir/debug/tst-sprintf-fortify-rdonly-static
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00010000 0x00010000 0xa7e70 0xa7e70 R E 0x1000
LOAD 0x0a8000 0x000b8000 0x000b8000 0x044c0 0x07ad0 RW 0x1000
NOTE 0x0000f4 0x000100f4 0x000100f4 0x00024 0x00024 R 0x4
NOTE 0x0a7e50 0x000b7e50 0x000b7e50 0x00020 0x00020 R 0x4
TLS 0x0a8000 0x000b8000 0x000b8000 0x00018 0x0002c R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
Section to Segment mapping:
Segment Sections...
00 .note.gnu.build-id .init .text .fini .rodata .PARISC.unwind .eh_frame
.gcc_except_table .note.ABI-tag
01 .tdata .init_array .fini_array .data.rel.ro .data .got .bss
02 .note.gnu.build-id
03 .note.ABI-tag
04 .tdata .tbss
05
It looks like the problem is data.rel.ro is in a writable segment. Need
to investigate more but this looks like a binutils issue.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list