[Issue 1071] New: DoS code on Windows Platform
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 20 00:42:51 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1071
Summary: DoS code on Windows Platform
Product: D
Version: 1.009
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: davidl at 126.com
static char[] hello()
{
char[] result="";
hello:
result ~= `abc`;
goto hello;
return result;
}
void main()
{
pragma(msg,hello());
}
what i want to say is DMD should limit the memory use of CTFE.
if CTFE keep use memory at a certain level and release some, reallocate some,
then the situation would be a disaster of compiling.
probably we should have a compile option to limit the compiler's use of
memory. if exceeds then break the compilation
buggy code could easily drop into an endless loop in CTFE
--
More information about the Digitalmars-d-bugs
mailing list