User Details
- User Since
- Jun 3 2023, 9:00 PM (70 w, 2 d)
Jun 29 2023
Jun 4 2023
yes, you are right; i have changed it
Jun 3 2023
proper patch: https://reviews.freebsd.org/D40415
Now that I am thinking about it, this may not be a compiler issue - the C standard specifies that the value of non-volatile local variables modified between the setjmp call and the longjmp is unspecified. So making these static is actually the right way to go.
This patch actually works around the problem:
and indeed, further testing reveals that the issue does not get fixed by this change (nor by moving setstackmark), only hidden; any changes to smark contents are *not* visible after the jump, which in practice means we are most likely leaking memory, or worse
@jilles I looked into this more and it seems that this is actually a miscompilation, possibly caused by the LLVM optimizer getting confused because of the long jumps.