[Issue 10391] New: Segfault compiling on Mac OS 10.8

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 17 08:17:40 PDT 2013


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

           Summary: Segfault compiling on Mac OS 10.8
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: spam at kalekold.net


--- Comment #0 from Gary Willoughby <spam at kalekold.net> 2013-06-17 08:17:39 PDT ---
Compile the following on Mac OS 10.8 with:

rdmd --force file.d 

To get a segfault: sh: line 1:  4242 Segmentation fault: 11  'dmd' '-v' '-o-'
'crash.d' '-I.' >
'/tmp/.rdmd-501/rdmd-crash.d-E195FFA0DB3CA615BD70C4621C863671/rdmd.deps'
Failed: 'dmd' '-v' '-o-' 'crash.d' '-I.'    


import std.datetime;
import std.string;
import std.stdio;

class Test
{
    public static string getMonth()
    {
        string[] months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct", "Nov", "Dec"];

        auto time = Clock.currTime();
        return format("%s", this.months[time.month - 1]); // using the 'this'
keyword produces segfault.
    }
}

void main(string[] arg)
{
    writefln("%s", Test.getMonth());
}

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


More information about the Digitalmars-d-bugs mailing list