Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent ASAN_SIGSEGV #989

Closed
pbn4 opened this issue Aug 9, 2018 · 1 comment
Closed

Silent ASAN_SIGSEGV #989

pbn4 opened this issue Aug 9, 2018 · 1 comment

Comments

@pbn4
Copy link

pbn4 commented Aug 9, 2018

Info: gcc-4.8.3, Ubuntu 16.04 LTS.

I compiled a project with -fsanitize=address. At startup the process freezes:

==10773== T5: stack [0x7fffd8f37000,0x7fffd9738000) size 0x801000; local=0x7fffd9736eec
==1== Parsed ASAN_OPTIONS: SHADOW_OFFSET=0x7fff0000:verbosity=1:debug=true:legacy_pthread_cond=true
==1== 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
red_zone=16
malloc_context_size=30
SHADOW_SCALE: 3
SHADOW_GRANULARITY: 8
SHADOW_OFFSET: 7fff8000
==1== Installed the sigaction for signal 11
==1== T0: stack [0x7fffff7ff000,0x7ffffffff000) size 0x800000; local=0x7fffffffd4bc
==1== AddressSanitizer Init done
ASAN:SIGSEGV

in gdb I see that my code has hung in:

#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185

Issue #733 is somewhat similar but does not provide clear answer to the problem.

How can I experiment with shadow memory as mentioned in #733?

Turns out it was cause by a conflict between asan shadow memory and our code. We changed asan shadow memory, and it worked now.

@dvyukov
Copy link
Contributor

dvyukov commented Aug 9, 2018

Hi Michał,

We generally don't maintain old releases and I doubt gcc 4.8 is maintained at all as it's 3.5 years old.
Please try latest gcc or clang. It's likely the problem is already fixed there whatever it is.

@dvyukov dvyukov closed this as completed Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants