This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/66826] Unused result from dlsym in constructor results in a segfault


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66826

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #5 from Rich Felker <bugdal at aerifal dot cx> ---
I think the issue is more complicated. Even if glibc were fixed not to crash,
code like the following:

return dlsym(RTLD_NEXT, "whatever");

would return the wrong result under tco when the caller's caller is in a
different dso. GCC probably needs a "notailcall" attribute to fix this, but
maybe there are workarounds glibc could do to prevent tco without needing a new
attribute...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]