Crashing erlang VM vith open_port

Taavi Talvik taavi@REDACTED
Sat Nov 22 23:49:07 CET 2003


Following program crashes beam VM. Is it possible to check
available resources or magic version headers or received packet lenght
before trying to allocate silly amount of memory?

best regards,
taavi

-module(test).

-export([test/0]).

test() ->
    Port = erlang:open_port({spawn,"echo blaah blaah blaah blaah"},
                            [binary,{packet,4},exit_status]),
   loop().

loop() ->
   receive
        {'EXIT', Var, PosixCode} ->
            exit(PosixCode);
	Message ->
            io:format("Messgae=~p~n",[Message])
   end,
   loop().



More information about the erlang-bugs mailing list