[Bug c/66826] Unused result from dlsym in constructor results in a segfault

2015-07-12 Thread quae at daurnimator dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66826 --- Comment #2 from Daurnimator --- I recompiled glibc with debug symbols. Program received signal SIGSEGV, Segmentation fault. _dl_lookup_symbol_x (undef_name=0x77634775 "anything", undef_map=0x77ffd998 <_rtld_local+2456>, ref=0x7ff

[Bug c/66826] Unused result from dlsym in constructor results in a segfault

2015-07-10 Thread quae at daurnimator dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66826 --- Comment #1 from Daurnimator --- nalaginrut (from #gcc irc channel) confirmed that the issue only occurs in GCC 5 at -O2 and higher. (the bug is *not* present in GCC 4.9 or at -O1). Note: only the compilation of shared.so matters (the main bi

[Bug c/66826] New: Unused dlsym return results in segfault

2015-07-09 Thread quae at daurnimator dot com
Assignee: unassigned at gcc dot gnu.org Reporter: quae at daurnimator dot com Target Milestone: --- Having a weird issue here: if I dlsym() something in a constructor, but don't use the result; the shared library segfaults at load. bug-main.c: #define _GNU_S