21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "memory/metaspaceShared.hpp"
27 #include "runtime/arguments.hpp"
28 #include "runtime/os.hpp"
29 #include "runtime/thread.hpp"
30 #include "utilities/debug.hpp"
31 #include "utilities/vmError.hpp"
32
33 #include <sys/types.h>
34 #include <sys/wait.h>
35 #include <signal.h>
36
37 #ifdef LINUX
38 #include <sys/syscall.h>
39 #include <unistd.h>
40 #endif
41 #ifdef SOLARIS
42 #include <thread.h>
43 #endif
44 #ifdef AIX
45 #include <unistd.h>
46 #endif
47 #ifdef BSD
48 #include <sys/syscall.h>
49 #include <unistd.h>
50 #endif
51
52
53 // handle all synchronous program error signals which may happen during error
54 // reporting. They must be unblocked, caught, handled.
55
56 static const int SIGNALS[] = { SIGSEGV, SIGBUS, SIGILL, SIGFPE, SIGTRAP }; // add more if needed
57 static const int NUM_SIGNALS = sizeof(SIGNALS) / sizeof(int);
58
59 // Space for our "saved" signal flags and handlers
60 static int resettedSigflags[NUM_SIGNALS];
61 static address resettedSighandler[NUM_SIGNALS];
62
63 // Needed for cancelable steps.
|
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "memory/metaspaceShared.hpp"
27 #include "runtime/arguments.hpp"
28 #include "runtime/os.hpp"
29 #include "runtime/thread.hpp"
30 #include "utilities/debug.hpp"
31 #include "utilities/vmError.hpp"
32
33 #include <sys/types.h>
34 #include <sys/wait.h>
35 #include <signal.h>
36
37 #ifdef LINUX
38 #include <sys/syscall.h>
39 #include <unistd.h>
40 #endif
41 #ifdef AIX
42 #include <unistd.h>
43 #endif
44 #ifdef BSD
45 #include <sys/syscall.h>
46 #include <unistd.h>
47 #endif
48
49
50 // handle all synchronous program error signals which may happen during error
51 // reporting. They must be unblocked, caught, handled.
52
53 static const int SIGNALS[] = { SIGSEGV, SIGBUS, SIGILL, SIGFPE, SIGTRAP }; // add more if needed
54 static const int NUM_SIGNALS = sizeof(SIGNALS) / sizeof(int);
55
56 // Space for our "saved" signal flags and handlers
57 static int resettedSigflags[NUM_SIGNALS];
58 static address resettedSighandler[NUM_SIGNALS];
59
60 // Needed for cancelable steps.
|