Closed jonmeredith closed 12 years ago
Reproducer, run with erl +A1 from the top level erlang_js dir t:run(). q().
will trigger
-module(t).
-compile([export_all]).
run() ->
code:add_path("ebin"),
ok = application:start(sasl),
ok = application:start(erlang_js),
true = (erlang:system_info(thread_pool_size) > 0),
ThreadStack = 1,
HeapSize = 1,
js_driver:new(ThreadStack, HeapSize).
Smaller reproducer
% Have to add -compile([export_all]) to js_driver.erl
-module(t).
-compile([export_all]).
-define(DRIVER_NAME, "erlang_js_drv").
run() ->
code:add_path("ebin"),
ok = application:start(sasl),
ok = application:start(erlang_js),
true = (erlang:system_info(thread_pool_size) > 0),
ThreadStack = 1,
HeapSize = 1,
js_driver:load_driver(),
Port = open_port({spawn, ?DRIVER_NAME}, [binary]),
js_driver:call_driver(Port, "ij", [ThreadStack, HeapSize], 5000),
js_driver:define_js(Port, <<"avar.js">>, <<"var v;">>, 5000). %% This call is critical
No coredump unless define_js is called.
Fixed in #25
When run with R15B against the current master branch, beam.smp coredumps on emulator exit.