diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-01 12:04:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-01 12:05:59 +0200 |
commit | 33260ea99b912a08ed5f6e774d9e289f2a9fd58c (patch) | |
tree | 8f246d4b8aa95534c7cbd7bc14b0196c683b73a6 /Userland | |
parent | 8d50cf492e9160ddc1059f24dbea77c6511e91f0 (diff) | |
download | serenity-33260ea99b912a08ed5f6e774d9e289f2a9fd58c.zip |
LibC: Fix jmp_buf layout on x86_64
This struct was too small on x86_64, but setjmp() would happily write
past the end of it.
This makes `test-js` run to completion on x86_64 :^)
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibC/setjmp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/setjmp.h b/Userland/Libraries/LibC/setjmp.h index 8182eb9a00..f5258cdb1e 100644 --- a/Userland/Libraries/LibC/setjmp.h +++ b/Userland/Libraries/LibC/setjmp.h @@ -15,7 +15,13 @@ __BEGIN_DECLS struct __jmp_buf { +#ifdef __i386__ uint32_t regs[6]; +#elif __x86_64__ + uint64_t regs[8]; +#else +# error +#endif bool did_save_signal_mask; sigset_t saved_signal_mask; }; |