Bug 618 – The following program crashes dmd.exe 0.175

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-11-29T04:03:00Z
Last change time
2014-02-15T13:22:24Z
Assigned to
bugzilla
Creator
boris.kolar

Comments

Comment #0 by boris.kolar — 2006-11-29T04:03:19Z
struct Foo(T) {} int main(char[][] args) { if ((Foo!(char)).init == (Foo!(char)).init) return 1; return 0; }
Comment #1 by thomas-dloop — 2006-11-29T15:36:16Z
Comment #2 by kirklin.mcdonald — 2006-11-29T17:10:33Z
[email protected] wrote: > http://d.puremagic.com/issues/show_bug.cgi?id=618 > > Summary: The following program crashes dmd.exe 0.175 > Product: D > Version: 0.175 > Platform: PC > OS/Version: Windows > Status: NEW > Severity: major > Priority: P2 > Component: DMD > AssignedTo: [email protected] > ReportedBy: [email protected] > > > struct Foo(T) {} > > int main(char[][] args) { > if ((Foo!(char)).init == (Foo!(char)).init) return 1; > return 0; > } > > Preliminary tests suggest that this is the same problem preventing Pyd from compiling under 0.175.
Comment #3 by matti.niemenmaa+dbugzilla — 2006-12-03T04:10:40Z
Fixed in DMD 0.176.
Comment #4 by braddr — 2007-01-19T02:54:52Z
http://d.puremagic.com/issues/show_bug.cgi?id=618 builds and runs for me: C, F, H, K fails to build for me: D: bug_optimize_294_D.d(7): Error: incompatible types for ((_D7dstress3run1b18bug_optimize_294_D10__T3FooTaZ3Foo6__initZ) != (_D7dstress3run1b18bug_optimize_294_D10__T3FooTgZ3Foo6__initZ)): 'Foo!(char)' and 'Foo!(byte)' segv's at runtime: G: Program received signal SIGSEGV, Segmentation fault. 0x0804a09b in _Dmain () at bug_optimize_294_G.d:7 7 if ((Foo!(char)).init == (Foo!(char)).init){ So.. the dstress results for C, F, H, K don't seem to match what you're seeing, Thomas. I'm running on a 32bit linux box and testing with dmd 1.00. Looks like D is failing for me, as your test results indicate, as is G. I'm going re-open the bug due to these two remaining problems for Walter to look at.
Comment #5 by thomas-dloop — 2007-01-20T05:05:34Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brad Roberts schrieb am 2007-01-19: > http://d.puremagic.com/issues/show_bug.cgi?id=618 > > builds and runs for me: C, F, H, K > > fails to build for me: > D: bug_optimize_294_D.d(7): Error: incompatible types for > ((_D7dstress3run1b18bug_optimize_294_D10__T3FooTaZ3Foo6__initZ) != > (_D7dstress3run1b18bug_optimize_294_D10__T3FooTgZ3Foo6__initZ)): > 'Foo!(char)' and 'Foo!(byte)' > > segv's at runtime: > G: Program received signal SIGSEGV, Segmentation fault. > 0x0804a09b in _Dmain () at bug_optimize_294_G.d:7 > 7 if ((Foo!(char)).init == (Foo!(char)).init){ > > > So.. the dstress results for C, F, H, K don't seem to match what you're > seeing, Thomas. I'm running on a 32bit linux box and testing with dmd 1.00. I've fixed a few copy'n paste errors in the test cases. The differences were moste likely caused because you tested dmd source.d && ./source ; echo PASSED while it should have been dmd source.d && ./source && echo PASSED || echo FAILED ("dmd -run" can't be used because it will return "0" regardless of "./source"'s return code) Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFsfQwLK5blCcjpWoRAnCvAJ957q8fbneCNfKSReoZXEcfot0yxgCgo/j7 VDj8lktygyGTsunvp1Vkcb0= =KWMf -----END PGP SIGNATURE-----
Comment #6 by braddr — 2007-01-20T14:14:53Z
Thomas Kuehne wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Brad Roberts schrieb am 2007-01-19: >> http://d.puremagic.com/issues/show_bug.cgi?id=618 >> >> builds and runs for me: C, F, H, K >> >> fails to build for me: >> D: bug_optimize_294_D.d(7): Error: incompatible types for >> ((_D7dstress3run1b18bug_optimize_294_D10__T3FooTaZ3Foo6__initZ) != >> (_D7dstress3run1b18bug_optimize_294_D10__T3FooTgZ3Foo6__initZ)): >> 'Foo!(char)' and 'Foo!(byte)' >> >> segv's at runtime: >> G: Program received signal SIGSEGV, Segmentation fault. >> 0x0804a09b in _Dmain () at bug_optimize_294_G.d:7 >> 7 if ((Foo!(char)).init == (Foo!(char)).init){ >> >> >> So.. the dstress results for C, F, H, K don't seem to match what you're >> seeing, Thomas. I'm running on a 32bit linux box and testing with dmd 1.00. > > I've fixed a few copy'n paste errors in the test cases. The differences > were moste likely caused because you tested > > dmd source.d && ./source ; echo PASSED > > while it should have been > > dmd source.d && ./source && echo PASSED || echo FAILED > > ("dmd -run" can't be used because it will return "0" regardless of > "./source"'s return code) > > Thomas > > > -----BEGIN PGP SIGNATURE----- > > iD8DBQFFsfQwLK5blCcjpWoRAnCvAJ957q8fbneCNfKSReoZXEcfot0yxgCgo/j7 > VDj8lktygyGTsunvp1Vkcb0= > =KWMf > -----END PGP SIGNATURE----- I wasn't using the dstress framework, just copy/paste the code for the failing test and ran it manually. I didn't actually even check the return code, just that it produced no output (close to the first case, but not even that elaborate :). Sorry, I must have been awfully sleepy when doing that as it's obvious that's not sufficient. What I'm actually thinking about here is how to check dstress vs bugzilla to make sure that bugs that are marked fixed are _actually_ fixed. And then make sure that all the failing tests have a corresponding bug filed (many just point to a news group posting, which is easily and for most probably lost in the distant past). Have you put any thought into how to do this verification step automatically? Later, Brad
Comment #7 by thomas-dloop — 2007-01-21T17:40:31Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brad Roberts schrieb am 2007-01-20: [...] > What I'm actually thinking about here is how to check dstress vs > bugzilla to make sure that bugs that are marked fixed are _actually_ > fixed. 1) svn checkout svn://svn.berlios.de/dstress/trunk/ dstress 2) cd dstress 3) dmd tools/db.d -ofdb 4) bunzip2 < raw_results/linux-amd64_dmd-1.00.log.bz2 | db > sql_data All test cases for bugs filed via Bugzilla have a @url@ line containing http://.*puremagic[.]com > And then make sure that all the failing tests have a > corresponding bug filed (many just point to a news group posting, which > is easily and for most probably lost in the distant past). If the test case has no puremagic-@url@, then there is a good chance that no Buzilla entry was filed. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFs//sLK5blCcjpWoRAkbFAJsEY+5qz/z3ykNTtIMirfdg0VE/WgCfVXQx pRLKOfy7yyKQJWRkY9bkjGo= =LVD1 -----END PGP SIGNATURE-----