3 ms·
I'm confused too. On x86, EFLAGS (of which the direction flag is bit 10) is absolutely preserved across signal delivery. It's the spot where the comparison re
by ajross 10y ago
I'm confused too. On x86, EFLAGS (of which the direction flag is bit 10) is absolutely preserved across signal delivery. It's the spot where the comparison result bits go, so if the issue in the linked blog post was real, it would be impossible to deliver a signal across a test/jump pair, making basically all compiled code signal-unsafe.
I don't know what historical architectures may have had a bug with this, but it's not true of x86. If memset isn't signal-safe on modern x86 linux, it's surely not because of EFLAGS state management.
- DannyBee 10y agoIt's about whether it's cleared entering a signal handler or not https://lkml.org/lkml/2008/3/5/207 https://lkml.org/lkml/2008/3/5/207 is the first message. Basically: ABI implementation bug in kernel. https://lkml.org/lkml/2008/3/5/231 https://lkml.org/lkml/2008/3/5/231 GCC started actually relying on the ABI being correct in version 4.3, folks noticed bug.