D archeology

Jakob Ovrum jakobovrum at gmail.com
Fri Dec 20 17:23:36 PST 2013


On Saturday, 21 December 2013 at 01:19:46 UTC, Luís Marques wrote:
> Yes, I implemented a timeout of just a few seconds (7s, I 
> think). It's short so that it doesn't take too long to test 
> with all the compiler versions. I actually tested that the 
> template recursion is limited (500) but not CTFE (at least in 
> my check of that it was still executing after about 15 
> minutes). That's also why there is already a test called 
> "infinite CTFE", I wanted to make sure that a DOS could not be 
> achieved with a single test case (but is still easy at the 
> moment, since I don't have rate limiting ;))

Ah, right - CTFE is indeed not time limited, only has a recursion 
limit I think. A limit imposed directly in the compiler would do 
more harm than good, so it's perfectly understandable.

Assuming you're invoking DMD as a shell command - make sure no 
user input ends up in the shell command, like the name of the 
test etc.


More information about the Digitalmars-d mailing list