Uttaran Dutta
Uttaran Dutta

Reputation: 1

ASAN with gcc-5.2 not intercepting exceptions

I was using the ASAN with gcc-4.8.2 for last 2 years without any issue. We moved to gcc-5.2 to use the new features like LSAN. After building the application with gcc-5.2 its not able to intercept the __cxa_throw anymore leading to a crash, found this after running ASAN with verbosity=1

==11314==AddressSanitizer: failed to intercept '__isoc99_printf'
==11314==AddressSanitizer: failed to intercept '__isoc99_sprintf'
==11314==AddressSanitizer: failed to intercept '__isoc99_snprintf'
==11314==AddressSanitizer: failed to intercept '__isoc99_fprintf'
==11314==AddressSanitizer: failed to intercept '__isoc99_vprintf'
==11314==AddressSanitizer: failed to intercept '__isoc99_vsprintf'
==11314==AddressSanitizer: failed to intercept '__isoc99_vsnprintf'
==11314==AddressSanitizer: failed to intercept '__isoc99_vfprintf'
==11314==AddressSanitizer: failed to intercept 'backtrace'
==11314==AddressSanitizer: failed to intercept '__cxa_throw'
==11314==AddressSanitizer: libc interceptors initialized
|| `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||
|| `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||
|| `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap  ||
|| `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||
|| `[0x000000000000, 0x00007fff7fff]` || LowMem     ||
MemToShadow(shadow): 0x00008fff7000 0x000091ff6dff 0x004091ff6e00 0x02008fff6fff
redzone=16
max_redzone=2048
quarantine_size=256M
malloc_context_size=30
SHADOW_SCALE: 3
SHADOW_GRANULARITY: 8
SHADOW_OFFSET: 7fff8000
==11314==Installed the sigaction for signal 11
==11314==T0: stack [0x7ffd377ce000,0x7ffd37fce000) size 0x800000; local=0x7ffd37fcb63c
==11314==AddressSanitizer Init done

And yes we statically link libstdc++ but this was not a problem in gcc-4.8.2 where ASAN was able to intercept everything properly.

Upvotes: 0

Views: 1205

Answers (1)

yugr
yugr

Reputation: 21886

This is a well known spurious warning from libasan (see e.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58680) and unfortunately it won't be fixed any time soon, if at all. But why do you run Asan with increased verbosity? Ordinary users shouldn't be interested in verbose info after all.

Upvotes: 1

Related Questions