www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - BUG: silly dmd crash

reply h3r3tic <foo bar.baz> writes:
void main()
{
     this.foobar;
}

/+ Shouldn't work. Shouldn't crash DMD. Crashes on my system: DMD .109, 
WinXP SP2 EN +/
Dec 22 2004
next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
h3r3tic wrote:

 void main()
 {
     this.foobar;
 }
 
 /+ Shouldn't work. Shouldn't crash DMD. Crashes on my system: DMD .109, 
 WinXP SP2 EN +/
Crashes GDC 0.9 too: (Mac OS X 10.3.7, GCC 3.3.5)
 test.d:0: internal compiler error: Bus error
--anders
Dec 22 2004
prev sibling next sibling parent "Simon Buchan" <currently no.where> writes:
On Thu, 23 Dec 2004 01:06:18 +0100, h3r3tic <foo bar.baz> wrote:

 void main()
 {
     this.foobar;
 }
Confirmed: - gives segfault/memory execption at address 0x40e2ba: Obviously should give error: bugtest.d(3): 'this' is only allowed in non-static member functions Note: not required to be main. With -v it doesn't even print parse... but there is nothing that could cause it to fail before printing that, so it must not have been flushed before the crash. (I suspect that tracking down bugs is kind of the whole point of printing this info?) taking a quick peek around: I am suspicios of expression.c 1182: fdthis = sc->parent->isFuncDeclaration(); possible main() scope doesn't have parent (unnamed module) inited? unlikely. -- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up" -- "I plan on at least one critical patch every month, and I haven't been disappointed." - Adam Hansen, manager of security at Sonnenschein Nath & Rosenthal LLP (Quote from http://www.eweek.com/article2/0,1759,1736104,00.asp) -- "It's been a challenge to "reteach or retrain" Web users to pay for content, said Pizey" -Wired website: "The Incredible Shrinking Comic"
Dec 22 2004
prev sibling parent "Thomas Kuehne" <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Added to DStress as
http://svn.kuehne.cn/dstress/nocompile/this_01.d
http://svn.kuehne.cn/dstress/nocompile/this_02.d

Thomas

-----BEGIN PGP SIGNATURE-----

iD8DBQFByyvK3w+/yD4P9tIRAnYkAJ459QtNLv7HxZSyVkdAJ7YhjRC+8QCgxb5+
3W4F7yQSImC0RtBDnMtfUrw=
=PyPh
-----END PGP SIGNATURE-----
Dec 23 2004