From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B099A3858D32; Thu, 27 Apr 2023 06:45:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B099A3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682577947; bh=cmmiefVMbMV34+TVZQ8HqzDqKCqfvp9m2EWpynwDqI8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LXk0PHNDnLJovKCzXyMFEPiHN1jaJBM8Fmu31doEyN7LCMQGPkFNXs32efzh7qk7j 5GVacccJZxXX6MHy2j8/Q3Ze7hjFvWyQbISQuNLkrtl/2zV3wj08nAXamSK2c2eMqD oYhJeylAJytKMIYwrHTvP2GXb2zplCmlrkWwZ1mA= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/109634] Linking Imagick for PHP compiles fine but gives segfault caused by libgomp on runtime Date: Thu, 27 Apr 2023 06:45:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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_status resolution Message-ID: In-Reply-To: References: 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=3D109634 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #4 from Jakub Jelinek --- As mentioned by Andrew, this is a user error. libgomp can be only dlopened in threaded apps if there is still space in the static TLS surplus, which unfortunately some versions of glibc use even for normal TLS rather than just static TLS. So, LD_PRELOAD=3Dlibgomp.so.1, or link the program with libgomp.so.1 rather= than just its libraries, or dlopen it before spawning threads. This is how glibc behaves, and unless we want to slow down libgomp extremel= y, there is nothing that can be done about it on the GCC side.=