Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
July 15, 2009 [Issue 3176] New: Out of Memory error on poorly formed recurrence function | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3176 Summary: Out of Memory error on poorly formed recurrence function Product: D Version: 2.031 Platform: x86_64 OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: Jesse.K.Phillips+D@gmail.com CC: Jesse.K.Phillips+D@gmail.com The code below will cause the compiler to exit with "Error: out of memory" import std.range; void main() { auto sequence = recurrence!("a[n-1] + a[n-2")(0,1); } There is a missing ] Expected a compilation error stating a malformed mixin. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 05, 2009 [Issue 3176] Out of Memory error on poorly formed recurrence function | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse.K.Phillips+D@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=3176 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clugdbug@yahoo.com.au --- Comment #1 from Don <clugdbug@yahoo.com.au> 2009-08-05 07:15:26 PDT --- Massively reduced test case: ---- struct C(T){ ref T opIndex(size_t n) { T t; return t[0]; } } void foo(S...)(S u) { alias typeof(mixin("{ C!(void) a; return a[1;}()")) z; } void main() { foo!()(0); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 05, 2009 [Issue 3176] Compiler hangs on poorly formed recurrence function | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse.K.Phillips+D@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=3176 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Out of Memory error on |Compiler hangs on poorly |poorly formed recurrence |formed recurrence function |function | OS/Version|Linux |All Severity|minor |major --- Comment #2 from Don <clugdbug@yahoo.com.au> 2009-08-05 08:18:18 PDT --- Gets into an infinite loop while parsing the mixin. Here's a superficial patch, which turns it into an ICE with line number. Doesn't fix the root cause, but still an improvement. parse.c, line 3358: while (token.value != TOKrcurly) { + if (token.value==TOKeof) { + printf("%s Internal Compiler Error: } expected, not EOF\n", + loc.toChars()); + assert(0); + } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 06, 2009 [Issue 3176] Compiler hangs on poorly formed mixin in variadic template | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse.K.Phillips+D@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=3176 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch Version|2.031 |1.045 Summary|Compiler hangs on poorly |Compiler hangs on poorly |formed recurrence function |formed mixin in variadic | |template --- Comment #3 from Don <clugdbug@yahoo.com.au> 2009-08-05 19:07:57 PDT --- /* Actually it's not so complicated as I thought -- it's just that after fixing this, it falls foul of bug #3196. On D1, this is a complete fix. PATCH: parse.c, line 2899 in DMD1.046, line 3358 in DMD2. - while (token.value != TOKrcurly) + while (token.value != TOKrcurly && token.value != TOKeof) */ // Even smaller test case: void foo(S...)(S u) { alias typeof(mixin("{ return a[1;}()")) z; } void main() { foo!()(0); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 13, 2009 [Issue 3176] Compiler hangs on poorly formed mixin in variadic template | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse.K.Phillips+D@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=3176 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #4 from Walter Bright <bugzilla@digitalmars.com> 2009-10-13 13:46:24 PDT --- Fixed dmd 1.049 and 2.034 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation