artifact_cache: fix leak of old-generation artifacts, when those artifacts are replaced by newer generation computations. artifacts can opaquely hold things like arena pointers, and so when we replace them in the cache, we need to respect the lookup api's provision of create/destroy hooks for the cache, such that the artifacts can be released correctly (using the destroy hook) before being replaced. this is separate from regular eviction.

This commit is contained in:
Ryan Fleury
2026-05-11 11:49:15 -07:00
parent 6a95da35e0
commit 52da228efe
8 changed files with 157 additions and 24 deletions
+1 -1
View File
@@ -6820,7 +6820,7 @@ d_call_stack_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U6
good = 1;
call_stack[0] = d_call_stack_from_unwind(arena, process, &unwind);
}
if(unwind.flags & D_UnwindFlag_Stale)
else
{
retry = 1;
}