[erlang-questions] Bug in ei

Serge Aleynikov saleyn@REDACTED
Fri Jul 13 04:54:16 CEST 2007


Hi,

There seems to be a double freeing of a pointer causing segfault in ei 
when the following two functions are called one after another:

ei_x_buff x;

ei_x_new(&x);
ei_x_format_wo_version(&x, "[{~a,~s},{~a,~i}]", "a", "b", "c", 10);

<note>
I haven't tried the call above with these particular parameters, but I 
think the bug is pretty obvious in ei_format.c and should be 
reproducible in all cases.
</note>

The following works as expected:

ei_x_buff x;

ei_x_new(&x);
ei_x_format(&x, "[{~a,~s},{~a,~i}]", "a", "b", "c", 10);


Serge



More information about the erlang-questions mailing list