1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 11:47:34 +00:00

LibC: Implement _setjmp and _longjmp

These are aliases to `setjmp()` and `longjmp()` on our system,
as our implementations don't modify the signal mask.

This is required for the syzkaller executor process.
This commit is contained in:
Brian Gianforcaro 2021-12-24 03:28:06 -08:00 committed by Brian Gianforcaro
parent eefe471dce
commit 49749e279a
2 changed files with 16 additions and 0 deletions

View file

@ -14,7 +14,9 @@
mov (%esp), %ebx
ret
.global _setjmp
.global setjmp
_setjmp:
setjmp:
xor %eax, %eax // Grab val argument (hardcoded to zero)
jmp .Lsigset_common
@ -57,7 +59,9 @@ sigsetjmp:
xor %eax, %eax
ret
.global _longjmp
.global longjmp
_longjmp:
longjmp:
mov 4(%esp), %ecx // Grab jmp_buf argument
mov 8(%esp), %eax // Grab val argument