Thread overview |
---|
October 16, 2007 [Issue 1586] New: DMD and GDC segfaults on incomplete code segment. | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1586 Summary: DMD and GDC segfaults on incomplete code segment. Product: D Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: hoytak@cs.ubc.ca Hello, A typo revealed a way to make the compiler segfault. Trying to compile the following incomplete code segment as a complete module causes the official D compiler (versions 1.022 and 2.005) and GDC 0.24 to segfault. //////////// module badcode; void myFunc() { auto func = &NotHere!(1).Bar!(k); // NotHere is not defined. } ///////////// Thanks! --Hoyt -- |
October 20, 2007 [Issue 1586] DMD and GDC segfaults on incomplete code segment. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1586 ------- Comment #1 from thomas-dloop@kuehne.cn 2007-10-20 01:55 ------- Added to DStress as http://dstress.kuehne.cn/nocompile/t/template_66_A.d http://dstress.kuehne.cn/nocompile/t/template_66_B.d http://dstress.kuehne.cn/nocompile/t/template_66_C.d http://dstress.kuehne.cn/nocompile/t/template_66_D.d http://dstress.kuehne.cn/nocompile/t/template_66_E.d -- |
October 28, 2007 [Issue 1586] DMD and GDC segfaults on incomplete code segment. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1586 ------- Comment #2 from braddr@puremagic.com 2007-10-28 04:10 ------- The segv is in this code: Expression *DotTemplateInstanceExp::semantic(Scope *sc) ... if (!s2) { error("template identifier %s is not a member of %s %s", id->toChars(), s->kind(), s->ident ? s->ident->toChars() : "(null)"); goto Lerr; } ... s->ident is null, so s->ident->toChars() is invalid. I added the ?: expression to validate that, and here's the resulting error message: /home/braddr/sandbox/d/bugs/bug1586.d:5: template instance identifier 'NotHere' is not defined /home/braddr/sandbox/d/bugs/bug1586.d:5: Error: template identifier Bar is not a member of template instance (null) My fix is wrong, but hopefully this will save Walter a few minutes of narrowing down. -- |
December 14, 2007 [Issue 1586] DMD and GDC segfaults on incomplete code segment. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1586 ------- Comment #3 from davidl@126.com 2007-12-14 00:30 ------- While I enjoy another fix: if (!s2) { if(s->ident) error("template identifier %s is not a member of %s %s", id->toChars(), s->kind(), s->ident->toChars() : "(null)"); goto Lerr; } Since the Template Instance is unknown so this error message is useless. -- |
May 07, 2009 [Issue 1586] DMD and GDC segfaults on incomplete code segment. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1586 ------- Comment #4 from clugdbug@yahoo.com.au 2009-05-07 02:21 ------- Fixed in DMD2.028; not yet in D1. -- |
May 14, 2009 [Issue 1586] DMD and GDC segfaults on incomplete code segment. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1586 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clugdbug@yahoo.com.au --- Comment #5 from Don <clugdbug@yahoo.com.au> 2009-05-14 01:20:36 PDT --- Fixed DMD2.028 and 1.045. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 14, 2009 [Issue 1586] DMD and GDC segfaults on incomplete code segment. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1586 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- 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