www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Can anyone reproduce this?

reply Timon Gehr <timon.gehr gmx.ch> writes:
On my machine, the following program causes an access violation in 
druntime instead of throwing an AssertError.

module test;
void foo(int x){assert(x);}
void main(){foo(0);}

dmd -run test
-- killed by signal 11


Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu 
11.10 64 bit)?
Can anyone reproduce this?
Jan 01 2012
next sibling parent reply Caligo <iteronvexor gmail.com> writes:
--bcaec501676b81fb3f04b581f94b
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Jan 1, 2012 at 7:51 PM, Timon Gehr <timon.gehr gmx.ch> wrote:

 On my machine, the following program causes an access violation in
 druntime instead of throwing an AssertError.

 module test;
 void foo(int x){assert(x);}
 void main(){foo(0);}

 dmd -run test
 -- killed by signal 11


 Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu 11.10
 64 bit)?
 Can anyone reproduce this?

mine throws an AssertError. DMD 2.057, Ubuntu 11.10 64bit --bcaec501676b81fb3f04b581f94b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <br><br><div class=3D"gmail_quote">On Sun, Jan 1, 2012 at 7:51 PM, Timon Ge= hr <span dir=3D"ltr">&lt;<a href=3D"mailto:timon.gehr gmx.ch">timon.gehr gm= x.ch</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma= rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On my machine, the following program causes an access violation in druntime= instead of throwing an AssertError.<br> <br> module test;<br> void foo(int x){assert(x);}<br> void main(){foo(0);}<br> <br> dmd -run test<br> -- killed by signal 11<br> <br> <br> Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu 11.10 = 64 bit)?<br> Can anyone reproduce this?<br> </blockquote></div><br><div>mine throws an AssertError.</div><div><br></div=
<div>DMD 2.057, Ubuntu 11.10 64bit</div>

--bcaec501676b81fb3f04b581f94b--
Jan 01 2012
parent reply Timon Gehr <timon.gehr gmx.ch> writes:
On 01/02/2012 03:02 AM, Caligo wrote:
 On Sun, Jan 1, 2012 at 7:51 PM, Timon Gehr <timon.gehr gmx.ch
 <mailto:timon.gehr gmx.ch>> wrote:

     On my machine, the following program causes an access violation in
     druntime instead of throwing an AssertError.

     module test;
     void foo(int x){assert(x);}
     void main(){foo(0);}

     dmd -run test
     -- killed by signal 11


     Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu
     11.10 64 bit)?
     Can anyone reproduce this?


 mine throws an AssertError.

 DMD 2.057, Ubuntu 11.10 64bit

Ok, thank you. I wonder what might cause this... I have the same issue with the following program with the -m32 flag. With -m64 it terminates normally instead of throwing. void main(){throw new Throwable("moo");}
Jan 01 2012
parent Timon Gehr <timon.gehr gmx.ch> writes:
On 01/02/2012 04:36 AM, Martin Nowak wrote:
 On Mon, 02 Jan 2012 03:23:00 +0100, Timon Gehr <timon.gehr gmx.ch> wrote:

 On 01/02/2012 03:02 AM, Caligo wrote:
 On Sun, Jan 1, 2012 at 7:51 PM, Timon Gehr <timon.gehr gmx.ch
 <mailto:timon.gehr gmx.ch>> wrote:

 On my machine, the following program causes an access violation in
 druntime instead of throwing an AssertError.

 module test;
 void foo(int x){assert(x);}
 void main(){foo(0);}

 dmd -run test
 -- killed by signal 11


 Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu
 11.10 64 bit)?
 Can anyone reproduce this?


 mine throws an AssertError.

 DMD 2.057, Ubuntu 11.10 64bit

Ok, thank you. I wonder what might cause this... I have the same issue with the following program with the -m32 flag. With -m64 it terminates normally instead of throwing. void main(){throw new Throwable("moo");}

The latter might be related to http://d.puremagic.com/issues/show_bug.cgi?id=7076.

Thanks, that helped me track down and solve the problem. It was caused by wrong linker flags. (I forgot to remove -L--gc-sections from dmd.conf after some testing and did not get any assertion failures since then.)
Jan 01 2012
prev sibling next sibling parent reply Joshua Reusch <yoschi arkandos.de> writes:
Am 02.01.2012 02:51, schrieb Timon Gehr:
 On my machine, the following program causes an access violation in
 druntime instead of throwing an AssertError.

 module test;
 void foo(int x){assert(x);}
 void main(){foo(0);}

 dmd -run test
 -- killed by signal 11


 Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu
 11.10 64 bit)?
 Can anyone reproduce this?

Seems like an 64 bit error. On my Ubuntu 11.10 machine (32bit) with the same dmd version, it "works" as expected.
Jan 01 2012
parent Joshua Reusch <yoschi arkandos.de> writes:
Am 02.01.2012 03:07, schrieb Joshua Reusch:
 Am 02.01.2012 02:51, schrieb Timon Gehr:
 On my machine, the following program causes an access violation in
 druntime instead of throwing an AssertError.

 module test;
 void foo(int x){assert(x);}
 void main(){foo(0);}

 dmd -run test
 -- killed by signal 11


 Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu
 11.10 64 bit)?
 Can anyone reproduce this?

Seems like an 64 bit error. On my Ubuntu 11.10 machine (32bit) with the same dmd version, it "works" as expected.

Ok, after Caligo: no 64 bit error ...
Jan 01 2012
prev sibling next sibling parent Caligo <iteronvexor gmail.com> writes:
--f46d0430896c6c554704b5821bbe
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Jan 1, 2012 at 8:07 PM, Joshua Reusch <yoschi arkandos.de> wrote:

 Am 02.01.2012 02:51, schrieb Timon Gehr:

  On my machine, the following program causes an access violation in
 druntime instead of throwing an AssertError.

 module test;
 void foo(int x){assert(x);}
 void main(){foo(0);}

 dmd -run test
 -- killed by signal 11


 Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu
 11.10 64 bit)?
 Can anyone reproduce this?

Seems like an 64 bit error. On my Ubuntu 11.10 machine (32bit) with the same dmd version, it "works" as expected.

I have the same exact setup as the OP, and mine works as expected, too. Doesn't seem like a 64-bit issue. --f46d0430896c6c554704b5821bbe Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <br><br><div class=3D"gmail_quote">On Sun, Jan 1, 2012 at 8:07 PM, Joshua R= eusch <span dir=3D"ltr">&lt;<a href=3D"mailto:yoschi arkandos.de">yoschi ar= kandos.de</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style= =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Am 02.01.2012 02:51, schrieb Timon Gehr:<div><div class=3D"h5"><br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> On my machine, the following program causes an access violation in<br> druntime instead of throwing an AssertError.<br> <br> module test;<br> void foo(int x){assert(x);}<br> void main(){foo(0);}<br> <br> dmd -run test<br> -- killed by signal 11<br> <br> <br> Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu<br> 11.10 64 bit)?<br> Can anyone reproduce this?<br> </blockquote> <br></div></div> Seems like an 64 bit error. On my Ubuntu 11.10 machine (32bit) with the sam= e dmd version, it &quot;works&quot; as expected.<br> </blockquote></div><br><div>I have the same exact setup as the OP, and mine= works as expected, too. =A0Doesn&#39;t seem like a 64-bit issue.</div> --f46d0430896c6c554704b5821bbe--
Jan 01 2012
prev sibling next sibling parent Matej Nanut <matejnanut gmail.com> writes:
--bcaec53f2e03b068f704b581f048
Content-Type: text/plain; charset=UTF-8

On 2 January 2012 02:51, Timon Gehr <timon.gehr gmx.ch> wrote:

 Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu 11.10
 64 bit)?
 Can anyone reproduce this?

I get an assert error. Using DMD 2.057 and Arch Linux, but on 32 bit. So I assume that might be it? --bcaec53f2e03b068f704b581f048 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div class=3D"gmail_quote">On 2 January 2012 02:51, Timon Gehr <span dir=3D= "ltr">&lt;<a href=3D"mailto:timon.gehr gmx.ch">timon.gehr gmx.ch</a>&gt;</s= pan> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex= ;border-left:1px #ccc solid;padding-left:1ex"> Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu 11.10 = 64 bit)?<br> Can anyone reproduce this?<br> </blockquote></div><br>I get an assert error. Using DMD 2.057 and Arch Linu= x, but on 32 bit. So I assume that might be it?<br><br> --bcaec53f2e03b068f704b581f048--
Jan 01 2012
prev sibling next sibling parent "Martin Nowak" <dawg dawgfoto.de> writes:
On Mon, 02 Jan 2012 03:23:00 +0100, Timon Gehr <timon.gehr gmx.ch> wrote:

 On 01/02/2012 03:02 AM, Caligo wrote:
 On Sun, Jan 1, 2012 at 7:51 PM, Timon Gehr <timon.gehr gmx.ch
 <mailto:timon.gehr gmx.ch>> wrote:

     On my machine, the following program causes an access violation in
     druntime instead of throwing an AssertError.

     module test;
     void foo(int x){assert(x);}
     void main(){foo(0);}

     dmd -run test
     -- killed by signal 11


     Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu
     11.10 64 bit)?
     Can anyone reproduce this?


 mine throws an AssertError.

 DMD 2.057, Ubuntu 11.10 64bit

Ok, thank you. I wonder what might cause this... I have the same issue with the following program with the -m32 flag. With -m64 it terminates normally instead of throwing. void main(){throw new Throwable("moo");}

The latter might be related to http://d.puremagic.com/issues/show_bug.cgi?id=7076.
Jan 01 2012
prev sibling parent reply Derek <ddparnell bigpond.com> writes:
On Mon, 02 Jan 2012 12:51:20 +1100, Timon Gehr <timon.gehr gmx.ch> wrote:

 On my machine, the following program causes an access violation in  
 druntime instead of throwing an AssertError.

 module test;
 void foo(int x){assert(x);}
 void main(){foo(0);}

 dmd -run test
 -- killed by signal 11


 Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu  
 11.10 64 bit)?
 Can anyone reproduce this?

Yes I can .... On my machine, the following program causes an access violation in druntime instead of throwing an AssertError. module test; void foo(int x){assert(x);} void main(){foo(0);} dmd -run test -- killed by signal 11 Is this a regression or a problem with my setup (DMD 2.057 on Ubuntu 11.10 64 bit)? Can anyone reproduce this? -- Derek Parnell Melbourne, Australia
Jan 01 2012
parent Derek <ddparnell bigpond.com> writes:
On Mon, 02 Jan 2012 14:36:37 +1100, Derek <ddparnell bigpond.com> wrote:
 Can anyone reproduce this?

May I did have one too many beers today ... -- Derek Parnell Melbourne, Australia
Jan 01 2012