← Back to index
|
Original Bugzilla link
Bug 10391 – Segfault compiling on Mac OS 10.8
Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Mac OS X
Creation time
2013-06-17T08:17:00Z
Last change time
2013-12-27T14:44:40Z
Assigned to
nobody
Creator
spam
Comments
Comment #0
by spam — 2013-06-17T08:17:39Z
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()); }
Comment #1
by safety0ff.bugz — 2013-10-26T21:49:10Z
This segfaults for 2.063.2 but runs fine on recent git version of dmd: crash.d(12): Error: no property 'months' for type 'crash.Test'