public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/28487] New: Static application fault with dlopen library in rtld_malloc stubs
@ 2021-10-22  3:15 Houdek.Ryan@fex-emu.org
  2021-10-22 11:04 ` [Bug libc/28487] " carlos at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Houdek.Ryan@fex-emu.org @ 2021-10-22  3:15 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28487

            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=13731&action=edit
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 stubs.

These stub symbols are expected to be setup by the original application being
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 initial
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 for
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-16  9:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22  3:15 [Bug libc/28487] New: Static application fault with dlopen library in rtld_malloc stubs Houdek.Ryan@fex-emu.org
2021-10-22 11:04 ` [Bug libc/28487] " carlos at redhat dot com
2021-10-22 11:39 ` Houdek.Ryan@fex-emu.org
2021-11-16  9:13 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).