Skip to content

Commit

Permalink
Update description on random segfault function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakio815 committed Feb 26, 2025
1 parent b7afd5c commit d543a7d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/C/src/Test3RandomSegfault.lf
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/**
Every time the timer triggers, try triggering a function, that randomly gets a segmentation fault. If a seg fault occurs, retry the function, going back to the checkpoint saved by setjmp(), and longjmp() functions.
Try until it success and hit the SUCCESS_COUNT_TARGET, during MAX_TRY_COUNT tries.
* Every time the timer triggers, try triggering a random_segfault() function,
* that randomly gets a segmentation fault.
* If a seg fault occurs, retry the function, going back to the checkpoint
* saved by setjmp(), and longjmp() functions.
* Try until it success and hit the SUCCESS_COUNT_TARGET, during MAX_TRY_COUNT tries.
* If it succeeds at least once before MAX_TRY_COUNT (2 tries), the system outputs 0.
* If it exceeds MAX_TRY_COUNT without success, the system outputs -1.
*/


target C

preamble {=
Expand Down

0 comments on commit d543a7d

Please sign in to comment.