News for hackers. Stuff that matters.
Re:Why isn't memset() async-signal-safe? by ajross on Tuesday January 03, 2017 @06:22PM (#13314242)
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.

Re:Why isn't memset() async-signal-safe? by DannyBee on Tuesday January 03, 2017 @06:51PM (#13314429)
It's about whether it's cleared entering a signal handler or not

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

GCC started actually relying on the ABI being correct in version 4.3, folks noticed bug.