September 12, 2009 [Issue 2229] ICE(template.c) instantiating an invalid variadic template with more than one argument | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2229 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #10 from Don <clugdbug@yahoo.com.au> 2009-09-12 11:50:02 PDT --- This is actually really simple. ROOT CAUSE: The D1 logic in template.c, TemplateDeclaration::deduceFunctionTemplateMatch() is completely wrong. if (nargsi > parameters->dim) && tp, the assert in the for loop will definitely fail. PATCH (around line 797 of template.c): ========== if (targsi) { // Set initial template arguments nargsi = targsi->dim; + size_t argsToUse = nargsi; if (nargsi > parameters->dim) { if (!tp) goto Lnomatch; dedargs->setDim(nargsi); dedargs->zero(); + argsToUse = parameters->dim; } memcpy(dedargs->data, targsi->data, nargsi * sizeof(*dedargs->data)); - for (size_t i = 0; i < nargsi; i++) + for (size_t i = 0; i < argsToUse; i++) { assert(i < parameters->dim); This patch also fixes bug 1897. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 13, 2009 [Issue 2229] ICE(template.c) instantiating an invalid variadic template with more than one argument | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2229 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #11 from Walter Bright <bugzilla@digitalmars.com> 2009-10-13 13:51:09 PDT --- Fixed dmd 1.049 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 07, 2009 [Issue 2229] ICE(template.c) instantiating an invalid variadic template with more than one argument | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2229 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #12 from Don <clugdbug@yahoo.com.au> 2009-11-07 14:51:08 PST --- The patch for this bug was incorrectly transcribed. template.c, line 807. - memcpy(dedargs->data, targsi->data, n * sizeof(*dedargs->data)); + memcpy(dedargs->data, targsi->data, nargsi * sizeof(*dedargs->data)); This is causing dstress case for bug 1144 to fail. http://dstress.kuehne.cn/nocmpile/m/mixin_34_A.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 08, 2009 [Issue 2229] ICE(template.c) instantiating an invalid variadic template with more than one argument | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2229 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nfxjfg@gmail.com --- Comment #13 from Don <clugdbug@yahoo.com.au> 2009-11-07 22:43:31 PST --- *** Issue 3482 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
December 06, 2009 [Issue 2229] ICE(template.c) instantiating an invalid variadic template with more than one argument | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2229 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #14 from Walter Bright <bugzilla@digitalmars.com> 2009-12-06 00:49:17 PST --- Fixed dmd 1.053 -- 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