[erlang-questions] c-node and arbitrary erlang term
David King
dking@REDACTED
Mon Aug 3 19:07:44 CEST 2009
> char *e_headers = "[{one, 1}, {two, 2}]";
> erlterm = erl_format("~s", e_headers);
> erl_reg_send(fd, "testc", erlterm);
> erl_free_term(erlterm);
> free(e_headers);
Have you made sure that your bus error is on the line you think it is?
If you're freeing a pointer to a literal char*, you'll get a bus
error. This alone generates a bus error on my system:
> int main() {
> char *e_headers = "[{one, 1}, {two, 2}]";
> free(e_headers);
> }
More information about the erlang-questions
mailing list