https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5284
--- Comment #20 from Evan Huus <eapache@xxxxxxxxx> 2012-04-25 13:01:10 PDT ---
After some thought, I believe option 2 (simply moving the ep_free_all() call to
epan_dissect_cleanup()) is not correct in the following case:
ep_dissect_new(edt1)
...
ep_dissect_new(edt2)
...
ep_dissect_cleanup(edt2)
...
ep_dissect_new(edt3)
...
ep_dissect_cleanup(edt3)
...
ep_dissect_cleanup(edt1)
When edt2 is cleaned up, the memory in the entire ephemeral pool is released,
and can then be overwritten by edt3, leading to corruption of memory that was
supposed to be owned by edt1. Ref-counting (option 3) fixes this case, but
means that memory allocated by edt2 stays allocated until edt1 is cleaned up,
which isn't nice, but isn't necessarily a problem either.
The original option (per-edt memory pools) works correctly in all the cases
I've been able to come up with.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.