-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sizeof(jmp_buf) possibly wrong #6
Comments
28 is correct, since |
My mistake earlier; the definition I pointed to was of The current Looking in more detail at what aarch64 does:
|
Just noticed that the orderings on all the barriers are wrong, will address later |
Proposed changes for the above are in #7 ; I'll make a separate PR to fix the barriers |
It's probably off-topic here, but re: "moving" |
I apologize for bumping a stale topic. I resized Orginally, |
jmp_buf
is declared as an array of 28 register-sized values:https://github.com/riscv/riscv-musl/blob/staging/arch/riscv64/bits/setjmp.h#L1
but we are actually saving 12 + 12 + 2 = 26 registers:
https://github.com/riscv/riscv-musl/blob/staging/src/setjmp/riscv64/setjmp.S#L10-L38
Moreover,
fs3
is being saved twice. riscv32 has the same issue withfs3
and, once that is corrected, also allocates 8 bytes more than thesetjmp
implementation actually seems to use.@ddevault this will be an ABI issue and should block upstreaming
The text was updated successfully, but these errors were encountered: