From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 568FD389680E; Wed, 2 Dec 2020 23:06:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 568FD389680E From: "hjl.tools at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/27004] New: ld.so is miscompiled by GCC 11 Date: Wed, 02 Dec 2020 23:06:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.33 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2020 23:06:25 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27004 Bug ID: 27004 Summary: ld.so is miscompiled by GCC 11 Product: glibc Version: 2.33 Status: NEW Severity: normal Priority: P2 Component: dynamic-link Assignee: unassigned at sourceware dot org Reporter: hjl.tools at gmail dot com Target Milestone: --- Target: x86-64 GCC 11 with commit d5ac0401eb128bf3dadec943741dfde7c499e49a Author: Haochen Gui Date: Tue Nov 17 13:52:15 2020 -0600 Relocatable read-only section support for absolute jump table compiles _dl_lookup_symbol_x into (gdb) r --direct Starting program: /export/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/sunrpc/tst-ge= tmyaddr --direct Program received signal SIGSEGV, Segmentation fault. _dl_lookup_symbol_x (undef_name=3D0x7ffff7ff416a "__vdso_clock_gettime",=20 undef_map=3D0x7ffff7ffe7b0, ref=3D0x7fffffffda98, symbol_scope=3D0x7fff= f7ffeb48,=20 version=3D0x7fffffffdac0, type_class=3D0, flags=3D0, skip_map=3D0x0) at dl-lookup.c:929 929 && add_dependency (undef_map, current_value.m, flags) < 0) (gdb) disass Dump of assembler code for function _dl_lookup_symbol_x: 0x00007ffff7fdb8c0 <+0>: push %r15 0x00007ffff7fdb8c2 <+2>: push %r14 0x00007ffff7fdb8c4 <+4>: push %r13 0x00007ffff7fdb8c6 <+6>: push %r12 0x00007ffff7fdb8c8 <+8>: mov %rdi,%r12 0x00007ffff7fdb8cb <+11>: push %rbp 0x00007ffff7fdb8cc <+12>: mov %rdx,%rbp 0x00007ffff7fdb8cf <+15>: push %rbx =3D> 0x00007ffff7fdb8d0 <+16>: mov %fs:0x10,%rax ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %fs isn't initialized yet. 0x00007ffff7fdb8d9 <+25>: sub $0xa8,%rsp 0x00007ffff7fdb8e0 <+32>: mov %rsi,0x10(%rsp) 0x00007ffff7fdb8e5 <+37>: mov %rcx,0x20(%rsp) 0x00007ffff7fdb8ea <+42>: mov %r8,0x8(%rsp) 0x00007ffff7fdb8ef <+47>: mov %r9d,0x1c(%rsp) 0x00007ffff7fdb8f4 <+52>: mov %rax,0x30(%rsp) 0x00007ffff7fdb8f9 <+57>: movzbl (%r12),%edx 0x00007ffff7fdb8fe <+62>: test %dl,%dl 0x00007ffff7fdb900 <+64>: je 0x7ffff7fdbb40 <_dl_lookup_symbol_x+= 640> 0x00007ffff7fdb906 <+70>: mov %r12,%rcx 0x00007ffff7fdb909 <+73>: mov $0x1505,%ebx 0x00007ffff7fdb90e <+78>: xchg %ax,%ax 0x00007ffff7fdb910 <+80>: mov %rbx,%rax --Type for more, q to quit, c to continue without paging--q Quit (gdb) b main Breakpoint 1 at 0x4022f0: file ../support/test-driver.c, line 110. (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /export/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/sunrpc/tst-ge= tmyaddr --direct Program received signal SIGSEGV, Segmentation fault. _dl_lookup_symbol_x (undef_name=3D0x7ffff7ff416a "__vdso_clock_gettime",=20 undef_map=3D0x7ffff7ffe7b0, ref=3D0x7fffffffda98, symbol_scope=3D0x7fff= f7ffeb48,=20 version=3D0x7fffffffdac0, type_class=3D0, flags=3D0, skip_map=3D0x0) at dl-lookup.c:929 929 && add_dependency (undef_map, current_value.m, flags) < 0) (gdb) bt #0 _dl_lookup_symbol_x (undef_name=3D0x7ffff7ff416a "__vdso_clock_gettime"= ,=20 undef_map=3D0x7ffff7ffe7b0, ref=3D0x7fffffffda98, symbol_scope=3D0x7fff= f7ffeb48,=20 version=3D0x7fffffffdac0, type_class=3D0, flags=3D0, skip_map=3D0x0) at dl-lookup.c:929 #1 0x00007ffff7fd400f in dl_vdso_vsym ( name=3D0x7ffff7ff416a "__vdso_clock_gettime") at ../sysdeps/unix/sysv/linux/dl-vdso.h:52 #2 setup_vdso_pointers () at ../sysdeps/unix/sysv/linux/dl-vdso-setup.h:30 #3 dl_main (phdr=3D, phnum=3D13, user_entry=3D,=20 auxv=3D0x7fffffffdfe8) at rtld.c:1620 #4 0x00007ffff7feac47 in _dl_sysdep_start ( start_argptr=3Dstart_argptr@entry=3D0x7fffffffddf0,=20 dl_main=3Ddl_main@entry=3D0x7ffff7fd2eb0 ) at ../elf/dl-sysdep= .c:252 #5 0x00007ffff7ff1fd5 in _dl_start_final (arg=3D0x7fffffffddf0) at rtld.c:= 485 #6 _dl_start (arg=3D0x7fffffffddf0) at rtld.c:578 #7 0x00007ffff7fd2058 in _start () at rtld.c:12 #8 0x0000000000000002 in ?? () #9 0x00007fffffffe145 in ?? () #10 0x00007fffffffe198 in ?? () #11 0x0000000000000000 in ?? () (gdb) --=20 You are receiving this mail because: You are on the CC list for the bug.=