www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8359] New: std.stdio.write(ln) segmentation faults

http://d.puremagic.com/issues/show_bug.cgi?id=8359

           Summary: std.stdio.write(ln) segmentation faults
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: mihai.dumitresq gmail.com



---
Seemingly okay segmentation faults when compiled with dmd and run. (But no
problems with gdmd).
File:
    import std.stdio;

    float foo(float p) {
        writeln(p);
        return 0;
    }

    void main() {
        float p = 10.35f;
        writeln(p, " ", foo(p));
    }

Issue:
$ dmd foo.d && ./foo
Segmentation fault (core dumped)
$ gdmd foo.d && ./foo
10.35
10.35 0
$ dmd
DMD64 D Compiler v2.059

My guess: is write(ln) not reentrant? Maybe it should be?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 08 2012