You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{ Thing }=require('./addon.node');letjunk=[];for(leti=0;i<300000;i++){newThing();// wrapped object, immediately unreachablejunk.push({a: i});// keep allocation rate high so V8 collects on its ownif(junk.length>1000)junk=[];}console.log('survived');
The causing code change in 26.4.0 is the RemoveCleanupHook(); line added to destructor in commit 7ac3fe1. The call interacts with the improvement of the RemoveEnvironmentCleanupHook function in 1723773.
When the destructor is called due to headers being 26.4.0 or newer, but the runtime being <= 26.3.1, then it can trigger the CHECK_NOT_NULL(env); of the RemoveEnvironmentCleanupHook function.
The same assertion exists on the 24.x LTS line, but there it does not need a header/runtime
mismatch: headers and runtime both at 24.19.0 abort deterministically.
Using your reproducer unchanged, on Darwin 25.5.0 arm64 with the official tarballs, 5/5 runs
per cell:
The reason the diagonal fails there is that 24.19.0 got the RemoveCleanupHook() half of the
change (#63642) but not the 1723773d half that you identified, so no 24.x runtime tolerates
it:
v24.x-staging is in the same state today. Filed separately as #65446 since the fix
there is a backport rather than a runtime upgrade, but happy for it to be folded into this
issue if you would rather keep it in one place.
Activity
roy-trgscreen commentedon Aug 20, 2026
The same assertion exists on the 24.x LTS line, but there it does not need a header/runtime
mismatch: headers and runtime both at 24.19.0 abort deterministically.
Using your reproducer unchanged, on Darwin 25.5.0 arm64 with the official tarballs, 5/5 runs
per cell:
The reason the diagonal fails there is that 24.19.0 got the
RemoveCleanupHook()half of thechange (#63642) but not the
1723773dhalf that you identified, so no 24.x runtime toleratesit:
v24.x-stagingis in the same state today. Filed separately as #65446 since the fixthere is a backport rather than a runtime upgrade, but happy for it to be folded into this
issue if you would rather keep it in one place.
src: fix use-after-free in CleanupHookThunkRun
src: fix use-after-free in CleanupHookThunkRun
src: fix use-after-free in CleanupHookThunkRun
src: fix use-after-free in CleanupHookThunkRun
src: fix use-after-free in CleanupHookThunkRun
src: fix use-after-free in CleanupHookThunkRun
src: fix use-after-free in CleanupHookThunkRun
src: fix use-after-free in CleanupHookThunkRun
src: fix use-after-free in CleanupHookThunkRun