aboutsummaryrefslogtreecommitdiff
path: root/testes/nextvar.lua
diff options
context:
space:
mode:
Diffstat (limited to 'testes/nextvar.lua')
-rw-r--r--testes/nextvar.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/testes/nextvar.lua b/testes/nextvar.lua
index 03810a8e..7e5bed56 100644
--- a/testes/nextvar.lua
+++ b/testes/nextvar.lua
@@ -345,6 +345,18 @@ do
345 end 345 end
346end 346end
347 347
348
349do print("testing attack on table length")
350 local t = {}
351 local lim = math.floor(math.log(math.maxinteger, 2)) - 1
352 for i = lim, 0, -1 do
353 t[2^i] = true
354 end
355 assert(t[1 << lim])
356 -- next loop should not take forever
357 for i = 1, #t do end
358end
359
348local nofind = {} 360local nofind = {}
349 361
350 362