-
Notifications
You must be signed in to change notification settings - Fork 149
Assertion failed when handling errors #2185
Copy link
Copy link
Closed
Description
Hi, when running
Code.eval_string("raise \"foo\"")or trying to eval any code that raises, I get
Assertion failed: (term_is_tuple(stack_info) && term_get_tuple_arity(stack_info) >= 6), function stacktrace_exception_class, file stacktrace.c, line 332.
It's called by code handling OP_RAISE in opcodesswitch. The reason is that the stack_info is not a stack info, but a generated stacktrace:
[{erlang,apply,3,[{file,"patches/otp/erts/erlang.erl"},{line,332}]},{elixir_eval,__FILE__,1,[{file,"nofile"},{line,1}]},{elixir,eval_external_handler,3,[{file,"patches/elixir/elixir/elixir.erl"},{line,99}]},{erl_eval,avmo_do_apply,4,[{file,"erl_eval.erl"},{line,754}]},{erl_eval,avmo_do_apply,7,[{file,"erl_eval.erl"},{line,750}]},{erl_eval,avmo_expr_list,7,[{file,"erl_eval.erl"},{line,1026}]},{erl_eval,avmo_expr,6,[{file,"erl_eval.erl"},{line,456}]},{elixir,avmo_eval_forms,4,[{file,"src/elixir.erl"},{line,364}]},{elixir,avmo_eval_forms,4,[{file,"src/elixir.erl"},{line,374}]},{Elixir.Module.ParallelChecker,verify,1,[{file,"lib/module/parallel_checker.ex"},{line,112}]},{Elixir.Module.ParallelChecker,verify,1,[{file,"lib/module/parallel_checker.ex"},{line,111}]},{Elixir.Code,avmo_validated_eval_string,3,[{file,"lib/code.ex"},{line,572}]}]BTW, the stacktrace is cut on :erlang.apply/3 - there should be further calls.
Unfortunately, I wasn't able to prepare a simpler reproduction, and Code.eval_string requires Popcorn to work, but maybe this is enough to find the root cause.
Reactions are currently unavailable