Wireshark mailing list archives
Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.)
From: Evan Huus <eapache () gmail com>
Date: Thu, 24 Jul 2014 14:48:12 -0400
On Thu, Jul 24, 2014 at 2:42 PM, Bálint Réczey <balint () balintreczey hu> wrote:
Hi Jakub, 2014-07-22 0:52 GMT+02:00 <darkjames-ws () darkjames pl>:Hi, On Sat, Jul 12, 2014 at 02:27:06AM +0200, B??lint R??czey wrote:I plan using ASAN for all programs which would catch (among others) use-after-free and reading below or over the malloc()-ed memory area. Those can't be caught if the program uses another layer of bulk memory allocations. g_malloc() and g_slice_* has the same problem, but they can be overrideb by passing G_SLICE=always-malloc .We have these environment variables also, ver{3, 4} introduceWIRESHARK_DEBUG_WMEM_OBJECT_POOL_SKIP,where you can set, and object pool will not maintain free list ofobjects.I see no problem with enabling it by default when building with ASAN. Also it should be quite easy to use ASAN manual poisoning[1] with objectpool API.wmem_object_pool_alloc(wmem_allocator_t *allocator, wmem_object_pool_t*pool):if (pool->current_count > 0) { ... ASAN_UNPOISON_MEMORY_REGION(pool->free_list, pool->object_size); pool->free_list = pool->free_list->next; wmem_object_pool_free(wmem_allocator_t *allocator, wmem_object_pool_t*pool, void *ptr)... ASAN_POISON_MEMORY_REGION(ptr, pool->object_size); (not tested).Thank you, I was not aware of those macros. I think we should add those to the custom allocator code.
Just setting WIRESHARK_DEBUG_WMEM_OVERRIDE=simple is easier, is it not?
Cheers, Balint ___________________________________________________________________________ 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
___________________________________________________________________________ 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:
- tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Jakub Zawadzki (Jul 11)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Evan Huus (Jul 11)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Bálint Réczey (Jul 11)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Evan Huus (Jul 11)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Bálint Réczey (Jul 11)
- Message not available
- Fwd: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Evan Huus (Jul 11)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Evan Huus (Jul 11)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Evan Huus (Jul 11)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) darkjames-ws (Jul 21)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Bálint Réczey (Jul 24)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Evan Huus (Jul 24)
- Re: tvb allocator (was: Re: [Wireshark-commits] master b6d20a2: Optimize reseting epan_dissect_t when filtering.) Bálint Réczey (Jul 24)