Bug 4073 – core.cpuid crashes

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2010-04-08T06:29:00Z
Last change time
2014-02-15T02:46:45Z
Assigned to
sean
Creator
biozic

Comments

Comment #0 by biozic — 2010-04-08T06:29:14Z
The following code crashes at runtime on Mac OS X, when executing --- import core.cpuid; void main() {} --- Trace: 0x00003405 D4core5cpuid8cpuidX86FZv + 37 0x00002a11 D4core5cpuid18_sharedStaticCtor1FZv + 29 0x000029af _D4core5cpuid15__modsharedctorFZv + 11 0x0000c1c2 D6object12_moduleCtor2FAPS6object10ModuleInfoiZv + 306 0x0000c236 D6object12_moduleCtor2FAPS6object10ModuleInfoiZv + 422 0x0000c02a _moduleCtor + 114 0x0000df7e D2rt6dmain24mainUiPPaZi6runAllMFZv + 26 0x0000dcde D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv + 42 0x0000dc6c main + 168 0x0000248d start + 53
Comment #1 by clugdbug — 2010-06-09T08:01:20Z
I believe I have fixed this in druntime svn 313, but I don't have access to a mac. Could someone please check this, so that it can be mentioned in the changelog for the next release, if it is fixed? (If it is genuinely fixed, then bug 4189 and bug 3658 are probably fixed as well).
Comment #2 by repeatedly — 2010-06-09T08:40:51Z
I tested following code using trunk on Mac OSX 10.6.3. ----- import std.stdio, core.cpuid; // from issue 4189 void main() { auto vec = new double[10]; foreach(i, ref x; vec) { x = cast(double) i; } vec[] *= 0.5; writeln(vec); } ----- It works! writeln prints "0 0.5 1 1.5 2 2.5 3 3.5 4 4.5".
Comment #3 by clugdbug — 2010-06-09T11:54:26Z
(In reply to comment #2) > I tested following code using trunk on Mac OSX 10.6.3. > It works! writeln prints "0 0.5 1 1.5 2 2.5 3 3.5 4 4.5". Thanks! Fixed druntime svn 313.