comparison src/os_cpu/linux_sparc/vm/os_linux_sparc.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 746b070f5022
children af21010d1062
comparison
equal deleted inserted replaced
11150:c29568b733d2 11151:5e3b6f79d280
551 ucontext_t* ucFake = (ucontext_t*) ucVoid; 551 ucontext_t* ucFake = (ucontext_t*) ucVoid;
552 sigcontext* uc = (sigcontext*)ucVoid; 552 sigcontext* uc = (sigcontext*)ucVoid;
553 553
554 Thread* t = ThreadLocalStorage::get_thread_slow(); 554 Thread* t = ThreadLocalStorage::get_thread_slow();
555 555
556 // Must do this before SignalHandlerMark, if crash protection installed we will longjmp away
557 // (no destructors can be run)
558 os::WatcherThreadCrashProtection::check_crash_protection(sig, t);
559
556 SignalHandlerMark shm(t); 560 SignalHandlerMark shm(t);
557 561
558 // Note: it's not uncommon that JNI code uses signal/sigset to install 562 // Note: it's not uncommon that JNI code uses signal/sigset to install
559 // then restore certain signal handler (e.g. to temporarily block SIGPIPE, 563 // then restore certain signal handler (e.g. to temporarily block SIGPIPE,
560 // or have a SIGILL handler when detecting CPU type). When that happens, 564 // or have a SIGILL handler when detecting CPU type). When that happens,