[erlang-questions] c-node and arbitrary erlang term
Roberto Ostinelli
roberto@REDACTED
Mon Aug 3 19:14:59 CEST 2009
oops sorry that would be the simplified version:
char *e_headers = "[{one, 1}, {two, 2}]";
fprintf(stderr, "1\n");
erlterm = erl_format("~w", e_headers);
fprintf(stderr, "2\n");
erl_reg_send(fd, "testc", erlterm);
fprintf(stderr, "3\n");
erl_free_term(erlterm);
fprintf(stderr, "4\n");
free(e_headers);
produces the following output:
1
Bus error
taking out the free(e_headers); doesn't change anything, since the
code doesn't even get to that line. as i said, using the ~s operator
does work, no error at all.
> On 03/ago/09, at 19:07, David King wrote:
>>
>> Have you made sure that your bus error is on the line you think it
>> is?
More information about the erlang-questions
mailing list