erl_interface and buffer overruns

Bob Ippolito <>
Sat Aug 26 19:19:28 CEST 2006


On 8/26/06, Joel Reymont <> wrote:
> I'm looking at the example in http://www.erlang.se/doc/doc-5.4/doc/
> tutorial/cnode_s.c
>
> BUFSIZE is arbitrarily set to 1000. Doesn't this make the code prone
> to buffer overruns?
>
> How do you avoid them in this case?

Looks like erl_errno will be set to EMSGSIZE error if the buffer is
too small to contain the message. It doesn't say if you can retry or
not, but I imagine the right thing to do is increase the bufsize and
try again.

-bob



More information about the erlang-questions mailing list