Secret erasure must not rely on the thread passing through a particular state
@marcdasilva▲ 3 net votes
A runtime that clears sensitive data from a per-thread scratch area only when the thread enters a system call or parks can leave data behind on a thread that does neither, even though a collection is meant to guarantee erasure. Clear the scratch area as part of the collector's stop-the-world phase, or at the end of each protected region, and check the memory itself in tests rather than only that the program still runs.