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

fix use_sigaltstack flag and consider enabling it by default. #224

Closed
ramosian-glider opened this issue Aug 31, 2015 · 4 comments
Closed

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 224

See the discussion at http://comments.gmane.org/gmane.comp.compilers.clang.devel/31810

Today, use_sigaltstack is broken for large apps, e.g. on Chrome it gives me this:
==6206==AddressSanitizer CHECK failed: ...llvm/projects/compiler-rt/lib/asan/asan_posix.cc:110
"((tsd_key_inited)) != (0)" (0x0, 0x0)

Also, use_sigaltstack has a non-zero cost in RAM (currently, 32K per thread),
so enabling it by default may degrade memory efficiency for some users.

Reported by konstantin.s.serebryany on 2013-09-18 09:37:15

@ramosian-glider
Copy link
Member Author

Today I see the following failure on chrome:

ASAN_OPTIONS=use_sigaltstack=1  ./out/Release/chrome --user-data-dir=zzz lenta.ru 

../../content/common/sandbox_seccomp_bpf_linux.cc:**CRASHING**:seccomp-bpf failure
in syscall 0131
ASAN:SIGSEGV
=================================================================
==9==ERROR: AddressSanitizer: SEGV on unknown address 0x00000d800083 (pc 0x7fa8f352a475
sp 0x7fa8d53e1380 bp 0x7fa8d53e1450 T1)
AddressSanitizer can not provide additional info.
    #0 0x7fa8f352a474 in PrintSyscallError  content/common/sandbox_seccomp_bpf_linux.cc:134
    #1 0x7fa8f352a474 in (anonymous namespace)::CrashSIGSYS_Handler(playground2::arch_seccomp_data
const&, void*) content/common/sandbox_seccomp_bpf_linux.cc:148
    #2 0x7fa8f4803566 in playground2::Trap::SigSys(int, siginfo*, void*)  sandbox/linux/seccomp-bpf/trap.cc:203
    #3 0x7fa8e107dcaf (/lib/x86_64-linux-gnu/libpthread.so.0+0xfcaf)
    #4 0x7fa8dfc1fef6 (/lib/x86_64-linux-gnu/libc.so.6+0x36ef6)
    #5 0x7fa8e92ff30f in __asan::SetAlternateSignalStack() /home/kcc/llvm/projects/compiler-rt/lib/asan/asan_posix.cc:63

Alex, please check what can be done with the sanbox. 

Reported by konstantin.s.serebryany on 2013-10-03 09:26:07

@ramosian-glider
Copy link
Member Author

http://llvm.org/viewvc/llvm-project?view=revision&revision=207099 enables use_sigaltstack=1

If this still does not play well with chrome's sandbox we'll need to disable use_sigaltstack
specifically for chrome

Reported by konstantin.s.serebryany on 2014-04-24 12:03:57

  • Status changed: Fixed

@ramosian-glider
Copy link
Member Author

For the record, __NR_sigaltstack has been whitelisted in ASan Chromium builds.

Reported by glider@chromium.org on 2014-09-15 04:24:10

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:13:42

  • Labels added: ProjectAddressSanitizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant