From owner-freebsd-bugs@freebsd.org Fri May 11 20:49:02 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B315FCC619 for ; Fri, 11 May 2018 20:49:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id EB25B6D56B for ; Fri, 11 May 2018 20:49:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id A770FFCC616; Fri, 11 May 2018 20:49:01 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83056FCC615 for ; Fri, 11 May 2018 20:49:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F1DB6D568 for ; Fri, 11 May 2018 20:49:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 393DA7310 for ; Fri, 11 May 2018 20:49:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w4BKn0mD079943 for ; Fri, 11 May 2018 20:49:00 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w4BKn0SE079940 for bugs@FreeBSD.org; Fri, 11 May 2018 20:49:00 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 227552] w, uptime i386 coredump in libxo Date: Fri, 11 May 2018 20:48:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: phil@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2018 20:49:02 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227552 --- Comment #26 from Phil Shafer --- 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 works/libxo.so.0 Jimi [lib/test]% install -s /usr/obj/usr/src/lib/libxo/libxo.so.0.full fails/libxo.so.0 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=3Dworks /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=3Dfails /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=3Dfails /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 04 There are 27 section headers, starting at offset 0x179a4: Jimi [lib/test]% which strip /usr/bin/strip Jimi [lib/test]% So "strip" (but not "install -s"?) doctors the TLS header, reducing the len= gth and causing TLS bss data to be uninitialized. Both versions have the .tbss section removed from the "Segment to Section" map. Thanks, Phil --=20 You are receiving this mail because: You are the assignee for the bug.=