URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=614495138077a02a1fa09f6c59a0e6f1d783a1e4
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
6144951 by Peter Wu (peter@xxxxxxxxxxxxx):
dfilter: fix memleaks with functions and slice operator
Running tools/dfilter-test.py with LSan enabled resulted in 38 test
failures due to memory leaks from "fvalue_new". Problematic dfilters:
- Return values from functions, e.g. `len(data.data) > 8` (instruction
CALL_FUNCTION invoking functions from epan/dfilter/dfunctions.c)
- Slice operator: `data.data[1:2] == aa:bb` (function mk_range)
These values end up in "registers", but as some values (from READ_TREE)
reference the proto tree, a new tracking flag ("owns_memory") is added.
Add missing tests for some functions and try to improve documentation.
Change-Id: I28e8cf872675d0a81ea7aa5fac7398257de3f47b
Reviewed-on: https://code.wireshark.org/review/27132
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from 0de109e x509ce: fix indent (use 2 spaces)
adds 6144951 dfilter: fix memleaks with functions and slice operator
Summary of changes:
epan/dfilter/dfilter-int.h | 1 +
epan/dfilter/dfilter.c | 11 ++++++-----
epan/dfilter/dfvm.c | 23 +++++++++++++++++++++--
tools/dftestlib/ipv4.py | 8 ++++++++
tools/dftestlib/string_type.py | 5 ++++-
tshark.c | 1 +
6 files changed, 41 insertions(+), 8 deletions(-)