Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  Crashing erlang VM vith open_port

taavi at uninet.ee
Posted: Sat Nov 22, 2003 10:49 pm Reply with quote
Guest
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().


Post generated using Mail2Forum (http://m2f.sourceforge.net)

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum