gcc static constructor multi-threading flaw

Christopher Faylor cgf@redhat.com
Fri Feb 14 15:11:00 GMT 2003

On Fri, Feb 14, 2003 at 10:09:44AM -0500, Joe Buehler wrote:
>Note that this is not a total fix.  As I recall, the code generated by
>gcc is inherently not thread-safe -- it's testing a global to see
>whether to do the constructor/destructor code block, and there is a
>race condition.

If this is a general gcc issue, then you should ping the gcc mailing list.

I'd like to see how the newlib folks respond to your atexit problem,
otherwise.  One of the principals is on vacation this week so we'll
see if he has anything to say next week.


More information about the Cygwin-developers mailing list