[erlang-bugs] erl -s <module> crashes
Alexander Zhuravlev
a.zhuravlev@REDACTED
Wed May 29 10:53:29 CEST 2013
On Tue, May 28, 2013 at 09:30:21PM -0400, Andrew Pennebaker wrote:
> When I try to `erl -s` any module, Erlang crashes. Dump attached.
>
> Trace:
>
> $ cat hello.erl
> %% 22 Feb 2011
>
> -module(hello).
> -author("andrew.pennebaker@REDACTED").
> -export([main/1]).
>
> main(_) -> io:format("Hello World!~n", []).
>
> $ erlc hello.erl
>
> $ erl -s hello
> Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:2:2]
> [async-threads:0] [hipe] [kernel-poll:false] [dtrace]
>
> {"init terminating in
> do_boot",{undef,[{hello,start,[],[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
>
> Crash dump was written to: erl_crash.dump
> init terminating in do_boot ()
You need to check description of the erl's "-s" flag. It accepts a module and
an optional function name (by default set to "start" if not specified).
zmac:~> cat hello.erl
-module(hello).
-export([main/0]).
main() ->
io:format("Hello World!~n", []).
zmac:~> erl -s hello main -s erlang halt
Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Hello World!
>
> System:
>
> $ specs erlang os
> Specs:
>
> specs 0.4
> https://github.com/mcandre/specs#readme
>
> rebar -V
> rebar 2.1.0-pre R15B03 20130528_213220 git 2.1.0-pre-46-g78fa8fc
>
> erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().'
> -noshell
> "R15B03"
>
> system_profiler SPSoftwareDataType | grep 'System Version'
> System Version: OS X 10.8.3 (12D78)
>
> --
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
--
Alexander Zhuravlev
More information about the erlang-bugs
mailing list