Re: Segfault introduced in b82fc3d on v2.1 branch

  • From: Katerina Barone-Adesi <katerinab@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 10 Jun 2015 21:01:34 +0100

I apologize for calling 1237 lines a minimized test case, but a large
variety of trivial-seeming attempts to make it smaller make it reproduce
the problem much more slowly, or not at all.

It's available at https://gist.github.com/kbara/5a93c82f83c62515cf84 and
clonable from https://gist.github.com/5a93c82f83c62515cf84.git

% while luajit bug225.lua; do echo -n g; done
gggluajit: ./ssa.lua:65: bad argument #1 to 'insert' (table expected, got
nil)
stack traceback:
[C]: in function 'insert'
./ssa.lua:65: in function 'compile_bool'
./ssa.lua:61: in function 'compile_bool'
./ssa.lua:61: in function 'compile_bool'
./ssa.lua:62: in function 'compile_bool'
./ssa.lua:61: in function 'compile_bool'
./ssa.lua:62: in function 'compile_bool'
./ssa.lua:66: in function 'compile_bool'
./ssa.lua:61: in function 'compile_bool'
./ssa.lua:81: in function 'lower'
bug225.lua:4: in main chunk
[C]: at 0x00404f60

The above backtrace appears about every 5-10 runs on average. Deleting
further functions or variables, or trying to minimize a variety of unused
functions makes the problem show up < 1% of the time or not at all,
depending on the change. On https://github.com/Igalia/pflua/issues/225 ,
Peter Melnichenko reported that even making a local variable name longer
could make the code no longer cause backtraces.

Other related posts: