www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18483] New: [DMC Libc] std.stdio.File is completely thread

https://issues.dlang.org/show_bug.cgi?id=18483

          Issue ID: 18483
           Summary: [DMC Libc] std.stdio.File is completely thread unsafe
                    on Win32
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: schveiguy yahoo.com

A bug was reported on reddit here:
https://www.reddit.com/r/d_language/comments/7yxwvm/why_do_my_threads_write_to_the_wrong_file/

And I narrowed it down to a DMC bug. I have filed the bug here:
http://bugzilla.digitalmars.com/issues/show_bug.cgi?id=327

Not going to repeat the whole thing, the DMC bug uses D code to show the
problem (I refuse to figure out how to make multiple threads in C on windows
DMC ;)

Long story short, there appears to be no thread safety when using FILE * and
DMC. Other platforms (including windows 64-bit) seem unaffected.

This seems related to issue 13727.

--
Feb 21 2018