www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Bus error w/combined writeln(int) and uniform

reply Magnus Lie Hetland <mlh idi.ntnu.no> writes:
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
Jan 30 2011
parent reply "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
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
Jan 31 2011
next sibling parent reply Magnus Lie Hetland <magnus hetland.org> writes:
On 2011-01-31 10:18:49 +0100, Lars T. Kyllingstad said:

 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

Thanks for the tip. I have no idea if they're related either; it seems I did get a segfault (and bus error) under other circumstances as well. I guess maybe I'll add a comment to the bug. -- Magnus Lie Hetland http://hetland.org
Jan 31 2011
parent reply Jacob Carlborg <doob me.com> writes:
On 2011-01-31 12:04, Magnus Lie Hetland wrote:
 On 2011-01-31 10:18:49 +0100, Lars T. Kyllingstad said:

 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

Thanks for the tip. I have no idea if they're related either; it seems I did get a segfault (and bus error) under other circumstances as well. I guess maybe I'll add a comment to the bug.

To begin with, are you using Mac OS X 10.5 or 10.6? If you're using 10.6 we can rule out that bug. -- /Jacob Carlborg
Jan 31 2011
parent Magnus Lie Hetland <magnus hetland.org> writes:
On 2011-01-31 17:03:50 +0100, Jacob Carlborg said:

 To begin with, are you using Mac OS X 10.5 or 10.6? If you're using 
 10.6 we can rule out that bug.

I'm using 10.5.8. -- Magnus Lie Hetland http://hetland.org
Feb 01 2011
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
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
Jan 31 2011
parent reply Magnus Lie Hetland <magnus hetland.org> writes:
On 2011-01-31 17:00:57 +0100, Jacob Carlborg said:

 On 2011-01-31 10:18, Lars T. Kyllingstad wrote:

 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 ?

That's the same one, no? (Did mean some other problem?-) -- Magnus Lie Hetland http://hetland.org
Feb 01 2011
parent Jacob Carlborg <doob me.com> writes:
On 2011-02-01 10:16, Magnus Lie Hetland wrote:
 On 2011-01-31 17:00:57 +0100, Jacob Carlborg said:

 On 2011-01-31 10:18, Lars T. Kyllingstad wrote:

 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 ?

That's the same one, no? (Did mean some other problem?-)

No I meant the same, sorry for the additional post and confusion. -- /Jacob Carlborg
Feb 01 2011