public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/25615] dlopen RTLD_NOLOAD optimization
       [not found] <bug-25615-131@http.sourceware.org/bugzilla/>
@ 2020-03-30 16:47 ` carlos at redhat dot com
  2024-03-13 20:27 ` conanhc at gmail dot com
  2024-03-14 10:09 ` fweimer at redhat dot com
  2 siblings, 0 replies; 3+ messages in thread
From: carlos at redhat dot com @ 2020-03-30 16:47 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com
   Last reconfirmed|                            |2020-03-30
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
At a glance I agree that this optimization seems to make sense. I haven't
thought too deeply about the consequences. Someone would have to ensure that
you could avoid calling _dl_map_object_deps and still get the intended link map
promotion effects and prove that with test cases that use RTLD_NOLOAD.

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

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

* [Bug dynamic-link/25615] dlopen RTLD_NOLOAD optimization
       [not found] <bug-25615-131@http.sourceware.org/bugzilla/>
  2020-03-30 16:47 ` [Bug dynamic-link/25615] dlopen RTLD_NOLOAD optimization carlos at redhat dot com
@ 2024-03-13 20:27 ` conanhc at gmail dot com
  2024-03-14 10:09 ` fweimer at redhat dot com
  2 siblings, 0 replies; 3+ messages in thread
From: conanhc at gmail dot com @ 2024-03-13 20:27 UTC (permalink / raw)
  To: glibc-bugs

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

Conan Huang <conanhc at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Conan Huang <conanhc at gmail dot com> ---
Optimization breaks following scenario:

If we dlopen(library, RTLD_NOLOAD | RTLD_LAZY). If that library doesn't have
its local search scope already set up (l_local_scope). Then dlopen will set it
up by calling  _dl_map_object_deps and going thru its dependencies.

With NOLOAD optimization patch, it'll skip _dl_map_object_deps, and not setup
l_local_scope.

If we call dlsym after dlopen(library, RTLD_NOLOAD), dynamic loader tries to
search that library's local scope for a definition. If l_local_scope is empty,
dynamic loader will segfault.

As a result, _dl_map_object_deps is needed to generate l_local_scope.

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

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

* [Bug dynamic-link/25615] dlopen RTLD_NOLOAD optimization
       [not found] <bug-25615-131@http.sourceware.org/bugzilla/>
  2020-03-30 16:47 ` [Bug dynamic-link/25615] dlopen RTLD_NOLOAD optimization carlos at redhat dot com
  2024-03-13 20:27 ` conanhc at gmail dot com
@ 2024-03-14 10:09 ` fweimer at redhat dot com
  2 siblings, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2024-03-14 10:09 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
I agree with this analysis. Thanks for posting the update. It's also the reason
why dlsym fails if you try it with a link map you got from _r_debug.

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

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

end of thread, other threads:[~2024-03-14 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-25615-131@http.sourceware.org/bugzilla/>
2020-03-30 16:47 ` [Bug dynamic-link/25615] dlopen RTLD_NOLOAD optimization carlos at redhat dot com
2024-03-13 20:27 ` conanhc at gmail dot com
2024-03-14 10:09 ` 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).