Commit f4547fbe authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

Fix parking for --stress-snapshot

Bug: v8:13039
Change-Id: I80c9e0ab84437f8e932c13b3cb134b9bdb74c1a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3759563Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81696}
parent c0ff58e0
......@@ -7,6 +7,7 @@
#include "src/snapshot/snapshot.h"
#include "src/common/assert-scope.h"
#include "src/heap/parked-scope.h"
#include "src/heap/safepoint.h"
#include "src/init/bootstrapper.h"
#include "src/logging/runtime-call-stats-scope.h"
......@@ -349,6 +350,10 @@ void Snapshot::SerializeDeserializeAndVerifyForTesting(
#endif // VERIFY_HEAP
}
new_isolate->Exit();
// The shared heap is verified on Heap teardown, which performs a global
// safepoint. Both isolate and new_isolate are running in the same thread, so
// park isolate before deleting new_isolate to avoid deadlock.
ParkedScope parked(isolate->main_thread_local_isolate());
Isolate::Delete(new_isolate);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment