Fix: work-around glibc lying about dlsym()/dlerror() leafness
Especially in the LTTng-UST malloc instrumentation, we run into the
following situation:
1) Our calloc wrapper is called,
2) we setup the static allocator,
3) we call dlsym() to lookup the symbol of the real allocator,
4) dlsym() calls into calloc(), which is overridden by our own wrapper.
Our calloc does not see that the static allocator has been set,
because the stores setting up the static allocator have been optimized
away by gcc-4.8 (in O2), because the dlsym() prototype declares it
with the "leaf" attribute, and thus we end up doing an infinite
recursion, and eventually a segmentation fault.
Thanks to Alexander Monakov for pointing out the culprit of this glibc
bug.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.02547 seconds and 4 git commands to generate.