D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6302 - Function imports in debug blocks crashes compiler
Summary: Function imports in debug blocks crashes compiler
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 critical
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 17:12 UTC by Andrej Mitrovic
Modified: 2012-01-04 07:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2011-07-12 17:12:17 UTC
module dmd_crash;

void main()
{
    debug
    {
        import std.math;
        FloatingPointControl fpc;
        fpc.enableExceptions(FloatingPointControl.severeExceptions);
    }    
}

> dmd -debug dmd_crash.d

---------------------------
dmd.exe - Application Error
---------------------------
The instruction at "0x00406be3" referenced memory at "0x00000030". The memory could not be "read".


Click on OK to terminate the program
Click on CANCEL to debug the program
---------------------------
OK   Cancel   
---------------------------
Comment 1 Andrej Mitrovic 2011-07-12 17:45:41 UTC
Lowering to critical as I can use my own version statements to work around this:

void main()
{
    version (Debug)
    {
        import std.math;
        FloatingPointControl fpc;
        fpc.enableExceptions(FloatingPointControl.severeExceptions);
    }    
}

> dmd -version=Debug dmd_crash.d

This will work.
Comment 2 Andrej Mitrovic 2012-01-04 07:10:47 UTC
Fixed in 2.057, but again there's no reference to a pull request. :/