[Bug dynamic-link/20673] ifunc resolver function cannot call extern functions

maskray at sourceware dot org via Glibc-bugs <[email protected]> Tue, 07 Jul 2026 07:45:10 +0000
Newsgroups gmane.comp.lib.glibc.bugs
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20673

Fangrui Song <maskray at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maskray at sourceware dot org

--- Comment #5 from Fangrui Song <maskray at sourceware dot org> ---
(In reply to Kazushi (Jam) Marukawa from comment #4)
> This bug still reproduces in 2026 with glibc 2.39 (Ubuntu 24.04) and glibc
> 2.17 (CentOS 7).
> 

I think this case is now passing.

The FreeBSD approach turns out to be very robust. Many segfault examples on
glibc work on FreeBSD. glibc 2.44 adopted a similar deferred scheme (commit
63b31c05a8; BZ #28218) and now handles many of these examples, including the
chained one below. An ifunc resolver can now call an extern function (e.g. a
libc function) even at startup (BZ #20673, "ifunc resolver function cannot call
extern functions", fixed in 2.44). 

Cases that remain open include circular dependencies between ifunc resolvers in
different modules (no valid resolution order exists) and IFUNC symbol
interposition via LD_PRELOAD with non-lazy binding (BZ #23240); BZ #20673 stays
as the umbrella.

---

We can leave this open for circular dependencies between ifunc resolvers in
different modules and use a different PR.

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