Skip to content

Commit

Permalink
Tell infer to ignore this file, as it reports a spurious memory leak.
Browse files Browse the repository at this point in the history
This is what it reports:

hpy/debug/src/debug_ctx.c:37: error: MEMORY_LEAK
  memory dynamically allocated by call to `malloc()` at line 25, column 26 is not reachable after line 37, column 5.
  35.       dctx->_private = info;
  36.
  37. >     debug_ctx_init_fields(dctx, uctx);
  38.       return 0;
  39.   }

However, it is clear that "info" is stored inside dctx->_private and so still
reachable.
  • Loading branch information
antocuni committed Jan 27, 2021
1 parent b1df2ae commit cd8cd6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cppcheck: cppcheck-build-dir

infer:
python3 setup.py build_ext -if -U NDEBUG | compiledb
@infer --fail-on-issue --compilation-database compile_commands.json
@infer --fail-on-issue --compilation-database compile_commands.json --report-blacklist-path-regex "hpy/debug/src/debug_ctx.c"

valgrind:
PYTHONMALLOC=malloc valgrind --suppressions=hpy/tools/valgrind/python.supp --suppressions=hpy/tools/valgrind/hpy.supp --leak-check=full --show-leak-kinds=definite,indirect --log-file=/tmp/valgrind-output python -m pytest --valgrind --valgrind-log=/tmp/valgrind-output test/

0 comments on commit cd8cd6e

Please sign in to comment.