Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8365165

Zap C-heap object memory at deletion

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 17, 21, 25, 26
    • hotspot

      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.

            Unassigned Unassigned
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: