Win32 OPTLINK crashes when it links some kind of static library into a executeable.

HOSOKAWA Kenchi hskwk at inter7.jp
Mon Sep 29 01:21:32 PDT 2008


dmd (later than 2.018) OPTLINK crashes when it links some kind of static library into a executeable.
Here is a small example as a quick report.


==== make following module into a static library

module test;
import std.random;
Mt19937 gen;
uint nonThreadSafeRandom() {return gen.next;}


==== OPTLINK crashes when making following code into a exe with linking the library just made before

import test;
void main() { uint a = nonThreadSafeRandom(); }


==== OPTLINK won't crash if deeper module is imported

import test, std.random;
void main() { uint a = nonThreadSafeRandom(); } 



This is a quick report, I have not found a true cause yet. 

Thanks, 

HOSOKAWA Kenchi


More information about the Digitalmars-d-bugs mailing list