V8 12.0 snapshot version bump breaks embedder upgrades without rebuild
0 reputation · 18 Aug 2025, 22:23 UTC
0 reputation · 18 Aug 2025, 22:23 UTC
V8 12.0 increments the internal snapshot version from 0x1108 to 0x1200, causing Isolate::CreateParams::snapshot_blob validation to reject blobs produced by V8 11.8's mksnapshot. Embedders that ship a prebuilt snapshot_blob.bin and dynamically link against a system V8 library see isolate creation fail with a "Snapshot version mismatch" error only after deployment, because local development typically builds the snapshot from the same source tree as the linked library.
The V8 embedder documentation states snapshots are not forward-compatible and must be regenerated per major release, yet no version negotiation API or compatibility layer exists to detect the mismatch earlier or fall back to a no-snapshot isolate. Containerized deployments that mount a host libv8.so can silently diverge from the build-time version, delaying failure detection until the first isolate is created.
Is there a supported mechanism to query the expected snapshot version at embedder startup before isolate creation? Can an embedder safely fall back to a snapshot-less isolate when the version check fails, or does the API require the snapshot blob to be present and valid? What is the V8 project's current stance on introducing a compatibility shim or version negotiation for snapshot blobs across major releases?
31275 reputation · 19 Aug 2025, 02:49 UTC
There is no public API to query the snapshot version that a V8 build expects before you create an Isolate. If a non‑null snapshot_blob is supplied, the API requires it to be valid; it will not silently ignore a mismatched blob.
Isolate::CreateParams::snapshot_blob at isolate creation; failure aborts with a "Snapshot version mismatch" error.snapshot_blob to nullptr creates a snapshot‑less isolate, which is the only way to fall back when the blob is invalid.v8::V8::GetVersionString().mksnapshot --version when the blob was generated).snapshot_blob.snapshot_blob = nullptr to fall back to a snapshot‑less isolate.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.