cppgc: Fix crash when finalizing incremental GC.
The gc_in_progress flag was reset to false only after sweeping was done. As a result, if we call CollectGarbage during an incremental GC and after marking has finished, the we will observe that a gc is still in progress but will not have a marker and crash. The immediate solution is to move resetting the gc_in_progress flag such that it indicates whether we didn't have the atomic pause yet. That means we could have gc_in_progress==false and incremental sweeping still running, which semantically negates the meaning of gc_in_progress. Observing that gc_in_progress essentially becomes equivalent to having a marker, this CL removes the gc_in_progress flag and replaces checks on it with checks on marker. Bug: chromium:1156170 Change-Id: Ic4b441ec248b5f7e222e988870e46d5166dd4dcc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584875 Commit-Queue: Omer Katz <omerkatz@chromium.org> Auto-Submit: Omer Katz <omerkatz@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#71712}
Showing
Please
register
or
sign in
to comment