[Vortex] Threaded vortex_connection_new causes segfaults
Wimpie Nortje
wimpienortje at gmail.com
Mon Apr 18 16:02:16 CEST 2011
Hi
I think I found a bug in vortex_connection_new. Using this function with
an OnConnected handler always gives me segfaults.
It looks like the problem is that vortex_connection_new passes a pointer
to Options to vortex_connection_new_full which passes the same pointer
to the thread. However, Options is a local struct variable in
vortex_connection_new that goes out of scope before the thread can use
it. Then later the thread tries to free the invalid pointer, which
causes the segfault.
The attached program shows the problem. It should be used with
vortex-simple-listener.
Regards
Wimpie
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: thread-con-new.c
URL: <http://lists.aspl.es/pipermail/vortex/attachments/20110418/624ac0c7/attachment.asc>
More information about the Vortex
mailing list