Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
gcc thread_local destructor cause use after free #2519
I posted this issue on the gcc bug tracker, but I am not entirely sure if this is supposed to be a GCC bug or a mingw bug.
I see it has also been reported here, however at the moment I can not create a sourceforge account to comment on that. I apologize if this is not the proper place.
The issue here, to my best understanding, is the following.
A quick workaround would be to reverse the loop in winpthread/src/thread.c:842. This will cause the destructors to be called in reverse order, and it will probably work correctly in most of the cases.
Yes I knew this bug a couple of years ago... but who the heck has been caring about this problem?
The emutls thing is utterly broken. I happened to report a similar issue a few hours ago (if you
So here comes the rule of thumb: Don't use