From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CB18F385782B; Fri, 22 Oct 2021 03:15:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB18F385782B From: "Houdek.Ryan@fex-emu.org" To: glibc-bugs@sourceware.org Subject: [Bug libc/28487] New: Static application fault with dlopen library in rtld_malloc stubs Date: Fri, 22 Oct 2021 03:15:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.33 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Houdek.Ryan@fex-emu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot 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 cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2021 03:15:02 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28487 Bug ID: 28487 Summary: Static application fault with dlopen library in rtld_malloc stubs Product: glibc Version: 2.33 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: Houdek.Ryan@fex-emu.org CC: drepper.fsp at gmail dot com Target Milestone: --- Created attachment 13731 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D13731&action=3Ded= it Test application. In some instances when a static/static-pie application does a dlopen on a shared library, the shared library will attempt to use the rtld_malloc stub= s. These stub symbols are expected to be setup by the original application bei= ng loaded. Since we were a static application, these symbols aren't ever setup= for something that the shared library to see. A likely workaround is that when the dynamic linker is loaded with the init= ial dlopen that `__rtld_malloc_init_real` should be called at some point. Sadly I'm having a hard time debugging this locally myself so I'm looking f= or help. I have a simple test application that compiles the main application elf as static-pie, then it loads a dynamic library that creates a thread. The act of creating a thread tries to use the rtld_malloc symbols. This was the easiest way I could find something that uses these malloc routines. This is attached as source. --=20 You are receiving this mail because: You are on the CC list for the bug.=