Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-21 Thread Pascal Quantin
Hi Moshe, Le mer. 21 juil. 2021 à 17:56, Moshe Kaplan a écrit : > Coverity is complaining that some of the allocations made with pinfo -> > pool are leaking. Is it possible that the pinfo->pool based allocations are > not always cleaned up? > > As an example, CoverityID 1487512 complains about

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-21 Thread Moshe Kaplan
Coverity is complaining that some of the allocations made with pinfo -> pool are leaking. Is it possible that the pinfo->pool based allocations are not always cleaned up? As an example, CoverityID 1487512 complains about packet-tcp.c's calls to port_with_resolution_to_str leaking:

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-21 Thread Evan Huus
FYI this migration has now begun. Going forward, please use pinfo->pool instead of wmem_packet_scope() in new code when possible. And if anybody has some time, there are lots of existing dissectors left to convert. I expect most of them to be pretty straightforward, just adding pinfo to a few more

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-12 Thread João Valverde via Wireshark-dev
On 12/07/21 19:48, Evan Huus wrote: On Mon, Jul 12, 2021 at 14:42 João Valverde via Wireshark-dev mailto:wireshark-dev@wireshark.org>> wrote: On 12/07/21 19:13, Evan Huus wrote: > On Mon, Jul 12, 2021 at 2:05 PM João Valverde via Wireshark-dev >

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-12 Thread Evan Huus
On Mon, Jul 12, 2021 at 14:42 João Valverde via Wireshark-dev < wireshark-dev@wireshark.org> wrote: > > > On 12/07/21 19:13, Evan Huus wrote: > > On Mon, Jul 12, 2021 at 2:05 PM João Valverde via Wireshark-dev > > wrote: > >> > >> > >> > >> On 12/07/21 16:52, Evan Huus wrote: > >>> I've been

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-12 Thread João Valverde via Wireshark-dev
On 12/07/21 19:13, Evan Huus wrote: On Mon, Jul 12, 2021 at 2:05 PM João Valverde via Wireshark-dev wrote: On 12/07/21 16:52, Evan Huus wrote: I've been thinking recently about starting the process of getting rid of the "global" wmem scope methods (wmem_packet_scope, wmem_file_scope,

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-12 Thread Evan Huus
On Mon, Jul 12, 2021 at 2:05 PM João Valverde via Wireshark-dev wrote: > > > > On 12/07/21 16:52, Evan Huus wrote: > > I've been thinking recently about starting the process of getting rid > > of the "global" wmem scope methods (wmem_packet_scope, > > wmem_file_scope, etc) in favour of passing

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-12 Thread João Valverde via Wireshark-dev
On 12/07/21 16:52, Evan Huus wrote: I've been thinking recently about starting the process of getting rid of the "global" wmem scope methods (wmem_packet_scope, wmem_file_scope, etc) in favour of passing them around in arguments (or in pinfo, or something). This would let us drop a bunch of

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-12 Thread Dr. Matthias St. Pierre
ocumented in README.wmem > but still error prone). ... > -Original Message- > From: Wireshark-dev On Behalf Of Dr. > Matthias St. Pierre > Sent: Monday, July 12, 2021 6:38 PM > To: Developer support list for Wireshark > Subject: Re: [Wireshark-dev] Replacing wmem_p

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-12 Thread Dr. Matthias St. Pierre
Hi Evan and Pascal, > > At a first glance, we already have pinfo->pool which maintains the > > lifetime of the packet_info object. As far as I can reason, this is > > almost/effectively the same as the existing wmem_packet_scope - it > > gets cleaned up later in the dissection flow, but there's

Re: [Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-12 Thread Pascal Quantin
Hi Evan, Le lun. 12 juil. 2021 à 17:52, Evan Huus a écrit : > I've been thinking recently about starting the process of getting rid > of the "global" wmem scope methods (wmem_packet_scope, > wmem_file_scope, etc) in favour of passing them around in arguments > (or in pinfo, or something). This

[Wireshark-dev] Replacing wmem_packet_scope() with pinfo->pool?

2021-07-12 Thread Evan Huus
I've been thinking recently about starting the process of getting rid of the "global" wmem scope methods (wmem_packet_scope, wmem_file_scope, etc) in favour of passing them around in arguments (or in pinfo, or something). This would let us drop a bunch of in-scope/out-of-scope tracking and