Bus error w/combined writeln(int) and uniform

Jacob Carlborg doob at me.com
Mon Jan 31 08:00:57 PST 2011


On 2011-01-31 10:18, Lars T. Kyllingstad wrote:
> On Sun, 30 Jan 2011 18:43:22 +0100, Magnus Lie Hetland wrote:
>
>> 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
>
> It works fine on Linux, which means the bug is likely OSX specific.  I
> only know of one "mysterious OSX segfault" bug currently in Bugzilla, but
> I'm not sure if it's related:
>
>    http://d.puremagic.com/issues/show_bug.cgi?id=4854
>
> -Lars

Can it be this problem: http://d.puremagic.com/issues/show_bug.cgi?id=4854 ?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list