Skip to content

Commit

Permalink
Re-initalize the segfault-trap so that consecutive segfaults are capt…
Browse files Browse the repository at this point in the history
…ured
  • Loading branch information
aiobofh committed Sep 17, 2017
1 parent 0953192 commit 16669cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cutest.h
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ static void cutest_segfault_handler(int s)
{
switch(s) {
case SIGSEGV:
signal(SIGSEGV, cutest_segfault_handler);
longjmp(buf, 1);
break;
default:
Expand Down Expand Up @@ -840,6 +841,7 @@ static void cutest_startup(int argc, char* argv[],
memset(&cutest_stats, 0, sizeof(cutest_stats));
strcpy(cutest_stats.suite_name, suite_name);
strcpy(cutest_stats.design_under_test, suite_name);

signal(SIGSEGV, cutest_segfault_handler);
}

Expand Down

0 comments on commit 16669cc

Please sign in to comment.