[Bug 227552] w, uptime i386 coredump in libxo

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri May 11 20:49:02 UTC 2018


--- Comment #26 from Phil Shafer <phil at freebsd.org> ---
Looks to be a "strip" issue:

Jimi [lib/test]% mkdir works fails
Jimi [lib/test]% install -s /usr/obj/usr/src/lib/libxo/libxo.so.0.full
Jimi [lib/test]% install -s /usr/obj/usr/src/lib/libxo/libxo.so.0.full
Jimi [lib/test]% ll */*0
-rwxr-xr-x  1 phil  phil  97756 May 11 16:43 fails/libxo.so.0*
-rwxr-xr-x  1 phil  phil  97756 May 11 16:43 works/libxo.so.0*
Jimi [lib/test]% env LD_LIBRARY_PATH=works /tmp/uptime
 4:45PM  up 7 days,  8:40, 3 users, load averages: 0.55, 0.45, 0.43
Jimi [lib/test]% env LD_LIBRARY_PATH=fails /tmp/uptime
 4:45PM  up 7 days,  8:40, 3 users, load averages: 0.51, 0.44, 0.43
Jimi [lib/test]% strip fails/libxo.so.0
Jimi [lib/test]% env LD_LIBRARY_PATH=fails /tmp/uptime
Segmentation fault (core dumped)
Jimi [lib/test]% readelf -e works/libxo.so.0 > works/out
Jimi [lib/test]% readelf -e fails/libxo.so.0 > fails/out
Jimi [lib/test]% diff -u works/out fails/out
--- works/out   2018-05-11 16:45:46.660037000 -0400
+++ fails/out   2018-05-11 16:45:56.004434000 -0400
@@ -28,7 +28,7 @@
   LOAD           0x000000 0x00000000 0x00000000 0x171f8 0x171f8 R E 0x1000
   LOAD           0x0171f8 0x000181f8 0x000181f8 0x005fc 0x0064c RW  0x1000
   DYNAMIC        0x0172f4 0x000182f4 0x000182f4 0x000d8 0x000d8 RW  0x4
-  TLS            0x0171f8 0x000181f8 0x000181f8 0x00000 0x0064c R   0x8
+  TLS            0x0171f8 0x000187f4 0x000187f4 0x00000 0x00050 R   0x8
   GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

  Section to Segment mapping:
@@ -36,7 +36,7 @@
    00     .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn
.rel.plt .init .plt .text .fini .rodata .eh_frame .comment .shstrtab
    01     .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .data .bss
    02     .dynamic
-   03     .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .data .bss
+   03     .bss
 There are 27 section headers, starting at offset 0x179a4:

Jimi [lib/test]% which strip
Jimi [lib/test]%

So "strip" (but not "install -s"?) doctors the TLS header, reducing the length
and causing TLS bss data to be uninitialized.   Both versions have the .tbss
section removed from the "Segment to Section" map.


You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list