Skip to content

v1.0.8

Choose a tag to compare

@hooji hooji released this 22 Mar 20:15
· 149 commits to main since this release
7cdfae4

What's New

Fix: Java 8 restore failures (enum == identity, ClassNotLoadedException)

Fixed enum restore failing on Java 8 with InvalidStackFrameException during JDI Phase 2 local variable setting.

Root cause: On Java 8, java.util.concurrent.TimeUnit (and potentially other classes) weren't loaded in the restore JVM. When setValue() threw ClassNotLoadedException, the fallback forceLoadClass() used invokeMethod to run Class.forName() — this implicitly resumes the thread, invalidating all cached StackFrame references. The subsequent retry setValue() then crashed with InvalidStackFrameException, causing the restore to fail silently (no enum output, no exception propagated).

Fixes:

  1. Pre-load all snapshot classes — Before any frame manipulation, iterate through all snapshot locals, extract class names from type descriptors, and force-load any unloaded classes via JDI. This eliminates ClassNotLoadedException during setValue(), avoiding the frame-invalidating forceLoadClass call entirely.

  2. Double-suspend in restore path — Apply the same double-suspend mitigation from v1.0.7's freeze fix to the restore path's Phase 1 and Phase 2 suspend()/resume() calls.

Testing

  • 127 unit tests, 35 integration tests across Java 8/9/11/25 × Ubuntu/macOS/Windows