rvirding/luerl — Issue #4: badarg crash w/o module or require
Author: hdiedrich
Created: 2012-02-26 20:36:49+00:00
State: open

Ok, then here is a more useful update maybe (I let the other issue stand as you are at it anyway).

I put it **all into one lua file**, without module or require, now I get a different error message, see below.

If it's best for you to just grab the all-in-one test file itself, it's here:

https://raw.github.com/Eonblast/luerl/henning/bench.lua

My branch is on `henning`, tag `issue4`. Just type `make bench` to run (it compiles `bench.erl` to call `bench.lua`). To see what should result, do `lua bench.lua`.

The error I get is:

{"init terminating in do_boot",{{badarg,nil,[1.000000e+00,nil]},[{luerl_eval,badarg_error,2,[{file,"src/luerl_eval.erl"},{line,865}]},{luerl_eval,le_op,4,[{file,"src/luerl_eval.erl"},{line,798}]},{luerl_eval,exp,2,[{file,"src/luerl_eval.erl"},{line,558}]},{luerl_eval,if_tests,3,[{file,"src/luerl_eval.erl"},{line,438}]},{luerl_eval,stats,2,[{file,"src/luerl_eval.erl"},{line,299}]},{luerl_eval,'-functioncall/3-fun-0-',4,[{file,"src/luerl_eval.erl"},{line,606}]},{luerl_eval,'-function_block/2-fun-0-',2,[{file,"src/luerl_eval.erl"},{line,630}]},{luerl_eval,with_block,2,[{file,"src/luerl_eval.erl"},{line,288}]}]}}

It seems to happen during `call/2`, in my `./bench.erl` (tag `issue4`), which does nothing but:

{ok, Chunk} = luerl:loadfile("./bench.lua"),
State = luerl:start(),
luerl:call(Chunk, State),

https://github.com/Eonblast/luerl/blob/henning/bench.erl