|
debug.sethook will let you count the number of line
executions.
Of course, perfect infinite loop detection is, in fact,
impossible (http://en.wikipedia.org/wiki/Halting_problem).
Ask Garry how he's doing it (probably by a C hook).
From: Travis Baker
Sent: Saturday, October 10, 2009 P5:33
Newsgroups: gmane.comp.lang.lua.general
Subject: Infinite Loop Detection Does anyone know how to go about creating something like this. It doesn't have to necessarily check for an infinite as much as hit a threshold limit for how many time a loop can repeat itself. Any Ideas? Thanks |