Wireshark mailing list archives
Re: [PATCH] Re: Freeing memory of se_alloc'ated object
From: darkjames-ws () darkjames pl
Date: Mon, 2 May 2011 17:09:18 +0200
On Mon, May 02, 2011 at 02:12:39AM +0400, Max wrote:
it costs one additional pointer per each memory chunk allocated.
Actually why dtor member is inside emem_chunk_t struct? and not inside emem_header_t? :>
I would gladly read you comments, critics and suggestions regarding this patch.
It seems that you put dtor data before canary, and you execute dtors before checking one. Buffer overflows can lead to executing code from given pointer. About API I'd prefer smth like: se_register_gc_dtor(void *ptr, emem_dtor_cb dtor) which would register already allocated ptr. (+) It'd work with any se_* allocated memory. (+) you can register it any time (not only at allocation) (-) you should check if ptr is valid pointer (se_verify_pointer()) ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Freeing memory of se_alloc'ated object Max (May 01)
- Re: Freeing memory of se_alloc'ated object Guy Harris (May 01)
- Re: Freeing memory of se_alloc'ated object Max (May 01)
- Re: Freeing memory of se_alloc'ated object Guy Harris (May 01)
- [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 01)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object darkjames-ws (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Jakub Zawadzki (May 03)
- Re: Freeing memory of se_alloc'ated object Max (May 01)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Jeff Morriss (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Guy Harris (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object ronnie sahlberg (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max Dmitrichenko (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Stephen Fisher (May 03)
- Re: Freeing memory of se_alloc'ated object Guy Harris (May 01)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Jeff Morriss (May 03)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 02)