Bus error w/combined writeln(int) and uniform

Magnus Lie Hetland mlh at idi.ntnu.no
Sun Jan 30 09:43:22 PST 2011


Tried to see if I could find this in the issue tracker; sorry if I  
missed it. (Maybe it manifests with something other than a bus error  
on other platforms?)

Anyway, when I run the following program in OS X (using dmd 2.051), it  
first prints out 1, and then I get a bus error:

import std.random, std.stdio;
void main() {
     writeln(1);
     auto y = uniform(0.0, 1.0);
}

Writing a string instead, for example, removes the problem (as does  
many other minor changes; I've tried to eliminate as much as possible  
from my original program while retaining the bug).

Is this already known, or should I submit it?

Thanks,

- M

-- 
Magnus Lie Hetland
http://hetland.org




More information about the Digitalmars-d mailing list