Weird std.stdio threading bug?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Apr 30 18:02:08 PDT 2009


Graham St Jack wrote:
> I posted a bug report for this a few days ago (2890). I got as far as 
> finding out that it is a file locking problem caused by what looks like a 
> compiler bug re calling the destructor of a struct. The following patch 
> to std.stdio works around the problem, but is hardly a fix.
> 
> $ diff dmd/src/phobos/std/stdio.d stdio.d
> 922c922
> <         //return LockingTextWriter(this);
> ---
>>         return LockingTextWriter(this);
> 925,926c925,926
> <         auto result = LockingTextWriter(this);
> <         return result;
> ---
>>         //auto result = LockingTextWriter(this);
>>         //return result;

Thanks! I checked in your fix. As you saw, std.stdio is full of 
commented-out code that I wrote in desperation. The copy construction 
bugs are killing me.


Andrei



More information about the Digitalmars-d mailing list