2 ms·
I would have thought that unwinding would use the frame pointer and this wouldn't be a problem.
by wat10000 1y ago
I would have thought that unwinding would use the frame pointer and this wouldn't be a problem.
- mperham 1y agoThe frame pointer was updated non-atomically in two asm ops. An async interruption between the two ops would lead to a corrupt frame pointer.
- wat10000 1y agoSo it was. The article never mentions the frame pointer and I'm familiar with compilers that load the saved value from the stack in the epilog, rather than adjusting it arithmetically. But they do have an assembly listing showing the two-step arithmetic adjustment for both the stack pointer and frame pointer. But I'm not sure that matters, because the unwind code they show uses the stack pointer rather than the frame pointer anyway.