From nobody Sun Dec 12 16:39:59 2021 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 3BC7E18D8239 for ; Sun, 12 Dec 2021 16:40:00 +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 4JBr336WNPz3HkH for ; Sun, 12 Dec 2021 16:39:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 BCB10245AE for ; Sun, 12 Dec 2021 16:39:59 +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 1BCGdxaR030453 for ; Sun, 12 Dec 2021 16:39:59 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1BCGdxpo030452 for bugs@FreeBSD.org; Sun, 12 Dec 2021 16:39:59 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 260364] Toolchain writes the shared library that SEGVs on load: Invalid permissions for mapped object. Date: Sun, 12 Dec 2021 16:39:59 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yuri@freebsd.org 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639327199; 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=JVpJrRoVHNZJHdVqgag4powMsfsbbtM3sTolZyDfaKU=; b=ilB/pNdwSxp12WKKFSUEq3ql4MVvQr03jpxnLSVU4vM3XvwbHFXkTLSW6pP/cSogcHmO0U lOgKlqL4MDv2oHpkjTk0vhbmJy4IJAF28bEvmqA1gK816991I29v1gDeLL0IlCX6TRHhjJ JpLeTstQquCcS+jkG31ZriTB6wTjSP2vpiOYZGSKEx85sXjU9BtGeHnaWJ3p1hlQFN6bc+ F+5bJE9W36giL7boD3ZjvpQvxi0mFigOAPf80Mf+D2K99xTsIw1Gk+IaVsL8McnUiHyEbS UPYvSHEfUqJOFcEyh3OZTivmOS87lzjeknyPyKMTZmk9XmALymzmYTZTci0WFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639327199; a=rsa-sha256; cv=none; b=KAudtD1sY4eGeiBQpSgVLv/QTpoJuiKGKEvZBCkJXh9acZcHqK7E0EGdU01S0UPY6i0fFs 4/jXmh4eSzp+8HCqz3N3gbfeRWNU/X2RYc1SLLeCjFwjrw1qPXs7v7BvO+0QW9Eln7/sy7 nLBsVQ+SGPR6iX0Ir0xZSY6iTH0PIYBpzZoWXSx8r5Wt3mVLuDvqodFMTYTl4NyPBfuXcf RfEfShA63pDL4uHcMVpG7dNEST8dU7Mymp8ftmxpPRucGayFE4mjHL7+jf4d2hOsjPfMz7 Zjvs5uDStsI+gWku2WFzDlK0Hap/rL+4gZK0o7Bh5NeHPmbH1URECqhbn16ang== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260364 Bug ID: 260364 Summary: Toolchain writes the shared library that SEGVs on load: Invalid permissions for mapped object. Product: Base System Version: 13.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: yuri@freebsd.org How to reproduce: 1. cd /usr/ports/audio/calf-lv2 2. pkg install -A 1 `make missing` 3. make # expected to fail, but the library in question work/stage/usr/local/lib/calf/libcalf.so is built 4. The following program SEGVs: > #include >=20 > int main() { > dlopen("work/stage/usr/local/lib/calf/libcalf.so", RTLD_NOW); > } The debugger says: > Program received signal SIGSEGV, Segmentation fault. > Invalid permissions for mapped object. > 0x00000008007ea5d8 in vtable for __cxxabiv1::__si_class_type_info () from= /lib/libcxxrt.so.1 > (gdb) bt > #0 0x00000008007ea5d8 in vtable for __cxxabiv1::__si_class_type_info () = from /lib/libcxxrt.so.1 > #1 0x0000000801d759ea in __dynamic_cast () from /usr/local/lib/gcc10/lib= stdc++.so.6 > #2 0x0000000801dfbd36 in bool std::has_facet >(std::loc= ale const&) () from /usr/local/lib/gcc10/libstdc++.so.6 > #3 0x0000000801dedac5 in std::basic_ios >::= _M_cache_locale(std::locale const&) () from /usr/local/lib/gcc10/libstdc++.= so.6 > #4 0x0000000801dedf71 in std::basic_ios >::= init(std::basic_streambuf >*) () from /usr/loc= al/lib/gcc10/libstdc++.so.6 > #5 0x0000000801d8a07b in std::ios_base::Init::Init() () from /usr/local/= lib/gcc10/libstdc++.so.6 > #6 0x000000080110c010 in ?? () from work/stage/usr/local/lib/calf/libcal= f.so > #7 0x000000080020dcdd in objlist_call_init (list=3D, list= @entry=3D0x7fffffffe270, lockstate=3D, lockstate@entry=3D0x7= fffffffe1f0) > at /disk-samsung/freebsd-src/libexec/rtld-elf/rtld.c:3030 > #8 0x0000000800212396 in dlopen_object (name=3Dname@entry=3D0x2005c0 "wo= rk/stage/usr/local/lib/calf/libcalf.so", fd=3D, fd@entry=3D-= 1, refobj=3D, > lo_flags=3D, mode=3D, mode@entry=3D2, l= ockstate=3D0x7fffffffe1f0, lockstate@entry=3D0x0) at /disk-samsung/freebsd-= src/libexec/rtld-elf/rtld.c:3778 > #9 0x000000080020eebd in rtld_dlopen (name=3D0x2005c0 "work/stage/usr/lo= cal/lib/calf/libcalf.so", fd=3D-1, mode=3D) at /disk-samsung= /freebsd-src/libexec/rtld-elf/rtld.c:3638 > #10 0x0000000000201984 in main () gcc is involved. But the built shared object shouldn't be broken. --=20 You are receiving this mail because: You are the assignee for the bug.=