Closed agladysh closed 12 years ago
This is a pretty nasty glitch that I'm surprised I hadn't encountered before. Adding unit tests and adjusting parsing throughout where possible to handle this without too much degradation of performance.
Should be addressed in the latest branches: 1.0.x, 1.1.x, master, and next.
The stack depth is now limited by the Lua C stack depth limit - for every new array/object, a Cmt call is made to collect the values. Minimal tests show that ~190 is the maximum nesting for arrays/objects... much better than ~23
Will need to investigate performance impact and possible update for either next or master to redesign composite value type parsing.
Ticket left open since performance effect of the patch is unmeasured in both memory space and runtime.
Note: added unit tests will only test to the 190 depth if you set TEST_UNSAFE=true in the environment that the unit tests will run.
Fix confirmed, thank you.
100% fixed in nonrecursive branch. tested a nested array of depth at least 10,000 w/ no problem
Resolved in 87fae51a2f1133392861e246cc5b423a175ba55c with a system that should only limit due to heap size and max size of Lua table.
As described here:
http://thread.gmane.org/gmane.comp.lang.lua.general/78559/focus=78561