lua-users home
lua-l archive

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


On Mon, May 2, 2011 at 02:16, Alexander Gladysh <agladysh@gmail.com> wrote:

> On rather small JSON data (will prepare a minimal sample ASAP) we get
> this error from luajson[1] 1.2.1:

> /luajson/lua/json/decode.lua:90: too many pending calls/choices

Here is the data that triggers the crash:

https://gist.github.com/950942

Steps to reproduce (involving json2lua for ease of use):

curl https://gist.github.com/raw/950942/f9ef959e46512793e7273a060bc58b04b567ea16/bad.json
>bad.json

sudo luarocks install json2lua
$ json2lua <bad.json
luajit2: /usr/local/share/lua/5.1//json/decode.lua:90: too many
pending calls/choices
stack traceback:
	[C]: in function 'match'
	/usr/local/share/lua/5.1//json/decode.lua:90: in function 'json_decode'
	(command line):79: in main chunk
	[C]: ?

json2lua is quite unsophisticated, and should not affect the outcome:

https://github.com/agladysh/json2lua/blob/master/json2lua#L182

Thanks,
Alexander.