[Vortex] How to correctly close a connection?

Robert M. Münch robert.muench at robertmuench.de
Mon Oct 13 17:48:26 CEST 2008


Am 13.10.2008, 15:30 Uhr, schrieb Francis Brosnan Blazquez <francis at aspl.es>:

>> ==15524== Thread 2:
>> ==15524== Invalid free() / delete / delete[]
>> ==15524==    at 0x401D43C: free (vg_replace_malloc.c:323)
>
> It's not the connection but a data stored in the connection (via
> vortex_connection_set_data or vortex_connection_set_data_full). In fact,
> it is failing to dealloc a data pointer, not the key.

Hi Francis, ah, this helps me a bit further. I'm storing some connection specific information via hashs. Need to cross check if this is inserted into a connection directly.

So vortex tries to free all user stored data if a connection is closed? And it assume that only pointers that can be deallocated are stored?

> Looking at this point, the axl hash is trying to deallocate a pointer
> (with no data; wrong address) with the associated free (maybe axl_free).

Ok.

> I'd check all calls done to store user defined data via
> vortex_connection_set_data or vortex_connection_set_data_full. The
> application is setting a pointer to nothing (with an associated dealloc
> function built on top of free).

Ok. I'm wondering why it crashes on Linux but not on Windows... but might be pure luck.

> Another approach will be to check when 0x401D43C is stored on the
> connection (do a break on vortex_connection_set_data_full to check each
> value stored).

Ok. I'll let you know about my new finding. Thanks again.

-- 
Robert M. Münch
Mobile: +49 (177) 245 2802
http://www.robertmuench.de


More information about the Vortex mailing list