-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
17, 21, 25, 26
We sometimes have a lifecycle problem with C-heap allocated objects. The most recent I dealt with is JDK-8364501. It would be convenient to have the base delete operators for e.g. CHeapObjBase to zap the contents of the deleted objects to catch these errors.
Is this even possible in a compatible manner? Are the performance overheads reasonable?
Is this even a good idea, or should we instead rely on underlying C heap allocators to do this zapping for us? glibc malloc seems to have a tunable, `MALLOC_PERTURB_`/`glibc.malloc.perturb` that might serve our needs. It would be interesting to opt-in to that for debug builds.
Is this even possible in a compatible manner? Are the performance overheads reasonable?
Is this even a good idea, or should we instead rely on underlying C heap allocators to do this zapping for us? glibc malloc seems to have a tunable, `MALLOC_PERTURB_`/`glibc.malloc.perturb` that might serve our needs. It would be interesting to opt-in to that for debug builds.