This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/66826] Unused result from dlsym in constructor results in a segfault
- From: "bugdal at aerifal dot cx" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jan 2017 05:11:29 +0000
- Subject: [Bug tree-optimization/66826] Unused result from dlsym in constructor results in a segfault
- Auto-submitted: auto-generated
- References: <bug-66826-4@http.gcc.gnu.org/bugzilla/>
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...