Open PerilousApricot opened 7 years ago
Yes!!!! That makes me feel better. You had several other issues all related to pigeon* routines that I couldn't fathom. I spent several hours looking at them and they all looked impossible. Every race incurred INSIDE the same lock in both threads. So I started looking for unbalanced lock/unlock but didn't find any... and that code isn't very complicated. The only thing I could think of was another memory stomp. Having a NULL lock makes me confident that's the problem.
BTW I've patched all the issues other than these.
Just a thought but you might add an additional field BEFORE the lock that's not used and mprotect it. At first glance mprotecting the opaque locks doesn't seem feasible but I haven't thought about it much.
The one hitch is that mrotect only works on page-aligned things. But, since that is a global, it should be easy to set a watch point.
It's dark in this basement.
Got this bizarre dump:
Not entirely sure how lock is null...