ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] File-scope memory on subsequent passes

From: Evan Huus <eapache@xxxxxxxxx>
Date: Mon, 30 Sep 2013 12:43:05 -0400
I recently found that there are some dissectors which allocate
file-scope memory every time they dissect a packet (not just on the
first pass, when the packet is unvisited). Can anybody think of a
reason for this, or should it be considered a bug?

I have attached a trivial (if hacky) patch which adds an assertion if
file-scope memory is used during the second pass of two-pass tshark.
Applying this and then running "fuzz-test.sh -2" on the menagerie
results in many failures.

This is not a proposal or anything, just an idea I had that produced
some unexpected results. I am curious if this is a valid use or known
issue or something.

Cheers,
Evan

Attachment: wmem_file_scope_second_pass.patch
Description: Binary data