add Lua sandbox with timer system (milestones 1-5 complete)
This commit is contained in:
12
sandbox-test/scripts/test_cpu_limit.lua
Normal file
12
sandbox-test/scripts/test_cpu_limit.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
-- This script runs an infinite loop
|
||||
-- It should be stopped by the instruction limit hook
|
||||
|
||||
local count = 0
|
||||
|
||||
while true do
|
||||
count = count + 1
|
||||
-- This loop should be interrupted by instruction hook
|
||||
end
|
||||
|
||||
-- Should never reach here
|
||||
error("FAIL: CPU limit not enforced - loop completed")
|
||||
Reference in New Issue
Block a user