From nobody Wed Feb 15 18:20:24 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH5wS5vQrz3r919 for ; Wed, 15 Feb 2023 18:20:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH5wS1hZ7z45qr for ; Wed, 15 Feb 2023 18:20:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676485224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fqB9BHM/Ub4op4HinZSGeGeF916a/38EgANBZiTkmFE=; b=n/rRYfgoYK/sEmY3Zd/nDPihaQZVMFnCbtE3qYStsAqfRz7KB0c+8kr7kEt6senCNHE8ll ycjK+mNAzHYyeCpvHij2gdf/8ErAkYDF3FZJprj4STG/vO8amP1xwLbIEGBRLybHIOZo0y yT/tUnqYCCt6HVw8chAgJ5m4VSTcABUZ882r/IqG+j23kCQUG0CX9Hwo/xj43opgEcA5lM SEBvGPQgcfpH0CsoatJqBimxZABHdPmVfeqtnj7m7VLYyahjb9mXPClTHtHcHIh6xt27A0 nIP4sZMcy5rwdEVB5Q3q4XyoR2kxlBAhfupwA9TaRCx+WUaa6FZGosdNgFrt4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676485224; a=rsa-sha256; cv=none; b=pa6ws8sDL02bkbaCb/hzdtsmgClzl68f3iC7L66Sde3yVHTktxWr++Rv7I1PKPAi4+Qw8J 0hbPfb4/8yD/HGsnjVc4rOpBk9NJQ72/blNrwDuOal6QVeoEzw0Mn1Tv2rxMjM2MCct/cZ g4yR+f5MmsDihiRgYE6gdmzHYyqzTrSxBRzPKuxDvg/8mFPLnAv3VgsLuk1XsAKD2k5wOI e39BoocsrRnyLBhO+JqC757Ww28goEqZGDVa2hYrKzJMatnXp5YbQLlAI7Zzgab8r+09bu vNp4Dk6YCowo7ASSr8um3y6szPf4YM01zdm1lunKh4hb00HxaxQnup0ygvfexQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PH5wS0mzvzZ3r for ; Wed, 15 Feb 2023 18:20:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 31FIKOpv044193 for ; Wed, 15 Feb 2023 18:20:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 31FIKOP6044192 for bugs@FreeBSD.org; Wed, 15 Feb 2023 18:20:24 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 269568] strip(1) creates an executable which crashes in ld-elf.so.1 Date: Wed, 15 Feb 2023 18:20:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tom@hur.st X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269568 Bug ID: 269568 Summary: strip(1) creates an executable which crashes in ld-elf.so.1 Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: tom@hur.st In updating the sysutils/jdupes port to 1.21.3, I came across a reproducible crash in the LOW_MEMORY=3D1 executable after it's been stripped: Process 46048 launched: '/usr/local/poudriere/ports/default/sysutils/jdupes/work/jdupes-1.21.3/jdup= es.stripped' (x86_64) Process 46048 stopped * thread #1, name =3D 'jdupes.stripped', stop reason =3D signal SIGSEGV: ad= dress access protected (fault address: 0x7fffffffd768) frame #0: 0x0000000800211c90 ld-elf.so.1`_rtld [inlined] init_rtld(mapbase=3D"\U0000007fELF\U00000002\U00000001\U00000001\t", aux_info=3D0x00007fffffffe100) at rtld.c:2406:5 2403 * The "path" member can't be initialized yet because string constants 2404 * cannot yet be accessed. Below we will set it correctly. 2405 */ -> 2406 memset(&objtmp, 0, sizeof(objtmp)); 2407 objtmp.path =3D NULL; 2408 objtmp.rtld =3D true; 2409 objtmp.mapbase =3D mapbase; Here's a small script to reproduce the issue more directly: #!/bin/sh set -e test -e jdupes || git clone --depth=3D50 https://github.com/jbruchon/jdupes= .git cd jdupes git checkout v1.21.3 gmake clean all LOW_MEMORY=3D1 strip ./jdupes lldb ./jdupes If /usr/local/bin/strip (GNU binutils) is used the crash doesn't occur. --=20 You are receiving this mail because: You are the assignee for the bug.=