From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7306A3858D33; Wed, 9 Aug 2023 07:33:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7306A3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691566389; bh=x3FF4YBJBJGaa5kgAYUV5myvqI5F/poadnlnQDNyado=; h=From:To:Subject:Date:From; b=irDCteCs5Pa5ApW7vWE8QAqEWip6QMflpntMSNf4oSwHDpD13uLG0o5DLOAsa/1j5 oAjR4T0B9GfLVI2K638WfeTjPnQWcUyCuoKyYcX6kyOR8oEgeO5iLA/TH7cceg7nB9 DAey+Mdr12u9u1a/xhmhssjdIcr17wtjoZDMdsZk= From: "sumbera at volny dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/110956] New: gcc_assert is hit at gcc-13.2.0/libgcc/unwind-dw2-fde.c#L291 with some special library Date: Wed, 09 Aug 2023 07:33:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sumbera at volny dot cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110956 Bug ID: 110956 Summary: gcc_assert is hit at gcc-13.2.0/libgcc/unwind-dw2-fde.c#L291 with some special library Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: sumbera at volny dot cz Target Milestone: --- Following test code on Solaris 11.4 i386 seems to get assertion at: https://github.com/gcc-mirror/gcc/blob/releases/gcc-13.2.0/libgcc/unwind-dw= 2-fde.c#L291 $ cat test.c #include #include #include #include int main(int argc, char *argv[]) { void *hdl; if (argc !=3D 2) { return 1; } printf("Open %s\n", argv[1]); hdl =3D dlopen(argv[1], RTLD_NOW); printf("hdl=3D%p\n", hdl); if (hdl) { dlclose(hdl); } else { printf("Error: %s\n", dlerror()); } printf("Closed\n"); return 0; } $ gcc -g -m32 -pthreads -D_GNU_SOURCE test.c $ ./a.out /usr/lib/ssm/lib/libstorelibir-2.so Open /usr/lib/ssm/lib/libstorelibir-2.so hdl=3Dfe6ec2a0 Abort (core dumped) $ mdb core Loading modules: [ libc.so.1 libsysevent.so.1 libnvpair.so.1 libuutil.so.1 libcmdutils.so.1 libavl.so.1 ld.so.1 ] a.out:core> $C feffe6ac libc_hwcap1.so.1`__lwp_sigqueue+0x15(1, 6, feffe6cc, fe19d9b6) feffe6cc libc_hwcap1.so.1`raise+0x22((int) 6) feffe71c libc_hwcap1.so.1`abort+0xf4() feffe78c libgcc_s.so.1`_Unwind_Find_FDE.cold(fd877404, fd876974, feffe7ac, fd8153f7) feffe7ac 0xfd81541c(fe6ee950, feffe7f8, fe6b268a, fe593718, 0, fe6eb2a8) feffe7b8 libstorelibir-2.so.20.10-0`_fini+0x15(fe593718, 0, fe6eb2a8, fe6e5= 850, fe6ee0f8, fe6ee294) feffe7f8 ld.so.1`call_fini+0x10a((Lm_list *) ld.so.1`lml_main, (Rt_map **) 0xfe593560, (Rt_map *) 0xfe6e5850) feffe888 ld.so.1`_remove_hdl+0x7eb((Rt_map *) 0xfe6e5850, (APlist **) 0xfeffe8a8, (APlist **) 0xfeffe8ac, (Boolean) 1 (TRUE)) feffe8c8 ld.so.1`remove_hdl+0x48((Grp_hdl *) 0xfe6ec2a0, (Rt_map *) 0xfe6e5= 850) feffe8e8 ld.so.1`dlclose_core+0xc5((Grp_hdl *) 0xfe6ec2a0, (Rt_map *) 0xfe6e5850, (Lm_list *) ld.so.1`lml_main) feffe928 ld.so.1`dlclose_intn+0x28((Grp_hdl *) 0xfe6ec2a0, (Rt_map *) 0xfe6e5850) feffe978 ld.so.1`dlclose_check+0x92((void *) 0xfe6ec2a0, (Rt_map *) 0xfe6e5= 850) feffe9b8 ld.so.1`dlclose+0x46((void *) 0xfe6ec2a0) feffe9e8 main+0x79(feffeaac, feffea04, 8050c3d) feffea2c _start+0x46(2, feffeb2e, feffeb36, 0, feffeb5a, feffeb6a) -- Notes: - This can be seen with both libgcc from GCC 13.1 and 13.2. But not with li= bgcc from GCC 12.2 - libstorelibir-2.so is some Solaris specific library. When used with other libraries there is no problem - problem cannot be reproduced on Solaris SPARC=