RNGState::MixExtract() and Strengthen() call CSHA512::Reset() as a best-effort cleanup, but Reset() does not clear the hasher's 128-byte block buffer. After a GetRandBytes() call that buffer still holds the previous RNG state, and after Strengthen() it holds the chain value whose hash went into the outer hasher. Both are left on the stack.
I replace the two Reset() calls with memory_cleanse() of the whole hasher, which leaves CSHA512 and its other users unchanged. A small program built from random.cpp finds the previous state in the hasher and the chain value on the stack before the change, and neither after. The unit tests pass.