[Bug sanitizer/59188] [4.9 Regression] lib64/libtsan.so: undefined reference to `sigsetjmp'
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 19 14:53:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59188
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
glibc (at least the 2.17 I have around) doesn't have sigsetjmp function at all,
it only conditionally has sigsetjmp as a macro:
#ifdef __USE_POSIX
...
/* Store the calling environment in ENV, also saving the
signal mask if SAVEMASK is nonzero. Return 0. */
# define sigsetjmp(env, savemask) __sigsetjmp (env, savemask)
...
#endif
so
extern "C" int setjmp(void *env);
extern "C" int _setjmp(void *env);
extern "C" int sigsetjmp(void *env);
extern "C" int __sigsetjmp(void *env);
DEFINE_REAL(int, setjmp, void *env)
DEFINE_REAL(int, _setjmp, void *env)
DEFINE_REAL(int, sigsetjmp, void *env)
DEFINE_REAL(int, __sigsetjmp, void *env)
is just asking for trouble. Not to mention that the arguments are wrong even
for __sigsetjmp, which has two arguments rather than just one. So, if it works
with clang, must be purely by accident, perhaps the difference is that
__USE_POSIX is defined in one case and not in the other one, or something, but
still, it can't really work in either case.
More information about the Gcc-bugs
mailing list