dentangle, What a frustrating little bug! 🐞 Fine on Linux, FreeBSD and OpenBSD - failing on NetBSD only.
I was convinced it was some weird memory ordering bug or perhaps something to do with NetBSD using gcc instead of clang. After digging through the asm and finding nothing I was tearing my beard out.
The actual problem? A usleep() in a test.
On #NetBSD the argument to usleep() must be less than 1,000,000µs. It was, in fact, exactly 1,000,000 == 1sec.
Argh!
Add comment