Merge

Thu, 06 Jun 2013 05:56:33 -0700

author
dcubed
date
Thu, 06 Jun 2013 05:56:33 -0700
changeset 5219
f8c8cace25ad
parent 5216
04551f4dbdb9
parent 5218
6bf8b8bb7c19
child 5232
ef1818846c22

Merge

src/os/bsd/vm/os_bsd.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/os/bsd/vm/os_bsd.cpp	Wed Jun 05 09:47:27 2013 -0700
     1.2 +++ b/src/os/bsd/vm/os_bsd.cpp	Thu Jun 06 05:56:33 2013 -0700
     1.3 @@ -3030,6 +3030,19 @@
     1.4      sigAct.sa_sigaction = signalHandler;
     1.5      sigAct.sa_flags = SA_SIGINFO|SA_RESTART;
     1.6    }
     1.7 +#if __APPLE__
     1.8 +  // Needed for main thread as XNU (Mac OS X kernel) will only deliver SIGSEGV
     1.9 +  // (which starts as SIGBUS) on main thread with faulting address inside "stack+guard pages"
    1.10 +  // if the signal handler declares it will handle it on alternate stack.
    1.11 +  // Notice we only declare we will handle it on alt stack, but we are not
    1.12 +  // actually going to use real alt stack - this is just a workaround.
    1.13 +  // Please see ux_exception.c, method catch_mach_exception_raise for details
    1.14 +  // link http://www.opensource.apple.com/source/xnu/xnu-2050.18.24/bsd/uxkern/ux_exception.c
    1.15 +  if (sig == SIGSEGV) {
    1.16 +    sigAct.sa_flags |= SA_ONSTACK;
    1.17 +  }
    1.18 +#endif
    1.19 +
    1.20    // Save flags, which are set by ours
    1.21    assert(sig > 0 && sig < MAXSIGNUM, "vm signal out of expected range");
    1.22    sigflags[sig] = sigAct.sa_flags;
     2.1 --- a/src/share/vm/runtime/thread.hpp	Wed Jun 05 09:47:27 2013 -0700
     2.2 +++ b/src/share/vm/runtime/thread.hpp	Thu Jun 06 05:56:33 2013 -0700
     2.3 @@ -638,9 +638,6 @@
     2.4    jint _hashStateZ ;
     2.5    void * _schedctl ;
     2.6  
     2.7 -  intptr_t _ScratchA, _ScratchB ;              // Scratch locations for fast-path sync code
     2.8 -  static ByteSize ScratchA_offset()            { return byte_offset_of(Thread, _ScratchA ); }
     2.9 -  static ByteSize ScratchB_offset()            { return byte_offset_of(Thread, _ScratchB ); }
    2.10  
    2.11    volatile jint rng [4] ;                      // RNG for spin loop
    2.12  

mercurial