Mercurial > hg > truffle
comparison src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp @ 11151:5e3b6f79d280
8020701: Avoid crashes in WatcherThread
Reviewed-by: acorn, dcubed, dsimms
author | rbackman |
---|---|
date | Wed, 17 Jul 2013 13:48:15 +0200 |
parents | 71f13276159d |
children | af21010d1062 |
comparison
equal
deleted
inserted
replaced
11150:c29568b733d2 | 11151:5e3b6f79d280 |
---|---|
399 int abort_if_unrecognized) { | 399 int abort_if_unrecognized) { |
400 ucontext_t* uc = (ucontext_t*) ucVoid; | 400 ucontext_t* uc = (ucontext_t*) ucVoid; |
401 | 401 |
402 Thread* t = ThreadLocalStorage::get_thread_slow(); | 402 Thread* t = ThreadLocalStorage::get_thread_slow(); |
403 | 403 |
404 // Must do this before SignalHandlerMark, if crash protection installed we will longjmp away | |
405 // (no destructors can be run) | |
406 os::WatcherThreadCrashProtection::check_crash_protection(sig, t); | |
407 | |
404 SignalHandlerMark shm(t); | 408 SignalHandlerMark shm(t); |
405 | 409 |
406 // Note: it's not uncommon that JNI code uses signal/sigset to install | 410 // Note: it's not uncommon that JNI code uses signal/sigset to install |
407 // then restore certain signal handler (e.g. to temporarily block SIGPIPE, | 411 // then restore certain signal handler (e.g. to temporarily block SIGPIPE, |
408 // or have a SIGILL handler when detecting CPU type). When that happens, | 412 // or have a SIGILL handler when detecting CPU type). When that happens, |