File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 77namespace ddprof {
88class OS : public ::OS {
99public:
10- inline static SigAction replaceSigsegvHandler (SigAction action) {
11- return ::OS::replaceCrashHandler (action);
12- }
13-
10+ static SigAction replaceSigsegvHandler (SigAction action);
1411 static SigAction replaceSigbusHandler (SigAction action);
1512
1613 inline static int getMaxThreadId (int floor) {
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ void ddprof::OS::mallocArenaMax(int arena_max) {
2929#endif
3030}
3131
32+ SigAction ddprof::OS::replaceSigsegvHandler (SigAction action) {
33+ return ::OS::replaceCrashHandler (action);
34+ }
35+
3236SigAction ddprof::OS::replaceSigbusHandler (SigAction action) {
3337 struct sigaction sa;
3438 sigaction (SIGBUS, NULL , &sa);
Original file line number Diff line number Diff line change @@ -17,11 +17,15 @@ void ddprof::OS::mallocArenaMax(int arena_max) {
1717}
1818
1919SigAction ddprof::OS::replaceSigbusHandler (SigAction action) {
20+ return ::OS::replaceCrashHandler (action);
21+ }
22+
23+ SigAction ddprof::OS::replaceSigsegvHandler (SigAction action) {
2024 struct sigaction sa;
21- sigaction (SIGBUS , NULL , &sa);
25+ sigaction (SIGSEGV , NULL , &sa);
2226 SigAction old_action = sa.sa_sigaction ;
2327 sa.sa_sigaction = action;
24- sigaction (SIGBUS , &sa, NULL );
28+ sigaction (SIGSEGV , &sa, NULL );
2529 return old_action;
2630}
2731
You can’t perform that action at this time.
0 commit comments