bdwgc icon indicating copy to clipboard operation
bdwgc copied to clipboard

Redirect reallocf, freezero[all] in leak_detector.h

Open ivmai opened this issue 2 years ago • 2 comments

Oracle provide some extra malloc/free variants, it would be good to intercept them for leak-finding purpose, at least. To do this:

  • Implement GC_reallocf() and GC_freezero()
  • Redirect reallocf, freezero, freezeroall in leak_detector.h

[1] https://docs.oracle.com/cd/E88353_01/html/E37843/reallocarray-3c.html [2] Related issues: #491, #494, #495

ivmai avatar Nov 02 '22 09:11 ivmai

How much work would it be to implement this? We are currently running into crashes when using Z3 with BDWGC because they are using https://github.com/Z3Prover/z3/pull/6321.

I do not quite understand how we could fix this from the BDWGC without patching Z3 and removing those calls.

fruffy avatar May 30 '24 22:05 fruffy

How much work would it be to implement this? We are currently running into crashes when using Z3 with BDWGC because they are using https://github.com/Z3Prover/z3/pull/6321.

I do not quite understand how we could fix this from the BDWGC without patching Z3 and removing those calls.

It looks like you are asking about malloc_usable_size(). I moved this part to a new issue (#644).

ivmai avatar May 31 '24 11:05 ivmai