[Issue 18762] DMD should use a unique path/filename for __stdin.o

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 15 20:06:09 UTC 2018


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

Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dlang-bugzilla at thecybershad
                   |                            |ow.net,
                   |                            |hsteoh at quickfur.ath.cx
          Component|dlang.org                   |dmd
            Summary|The spec tester fails to    |DMD should use a unique
                   |link examples with          |path/filename for __stdin.o
                   |__stdin.o                   |

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
The problem seems to be that the same object file name is used when reading
from stdin:

$ echo 'void main() {}' | dmd -v -run - | grep ^cc    
cc __stdin.o -o /tmp/dmd_runIAGsLe -m64 -Xlinker --export-dynamic
-L/home/vladimir/opt/dmd/bin/../lib64 -Xlinker -Bstatic -lphobos2 -Xlinker
-Bdynamic -lpthread -lm -lrt -ldl

This cannot work reliably in multiple threads, as several concurrent DMD
instances will write __stdin.o, and several concurrent linkers will attempt to
read it.

--


More information about the Digitalmars-d-bugs mailing list