-
-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Description
Hi ptitSeb,
I found an issue in the my_longjmp function in the file src/wrapped/wrappedlibc.cin box64.
The correct fix is as follows:
Change:
R_RAX = __val;
to:
if (__val == 0) {
R_RAX = 1;
} else {
R_RAX = __val;
}
test case for verification:
#include <stdio.h>
#include <setjmp.h>
sigjmp_buf env;
int main() {
int r = sigsetjmp(env, 1);
if (r == 0) {
printf("first\n");
siglongjmp(env, 0);
} else {
printf("second %d\n", r);
}
return 0;
}
Metadata
Metadata
Assignees
Labels
No labels