lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Am 27.02.2015 um 15:32 schröbte Roberto Ierusalimschy:
That error happens on the 32767th call to `test_lpeg` here, so it's
probably some overflow of a `short` variable ...

Yes, I got that far. What is strange is that it depends on the contents
of the set in Indent. lpeg.S"a\t" works, but lpeg.S" \t" does not...
(So, it does not seem to be just an overflow.)

False alarm? It works, but it still adds a new entry to the ktable at
each loop. Anyway, there seems to be two problems:

- It should not add new entries to the same ktable. (This seems a
problem in the logic behind 'ktable' sharing.)

- Even with the previous bug, it should detect the overflow.

Replacing all three `short`s in `*.h` with `int` extends the limit. I don't know whether it actually goes up to 2^32-x, because Lua uses up all my memory and swap before the new limit is reached.


-- Roberto


Philipp