Commit b63a5961 authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

[deoptimizer] Finish concurrent sweeping before overwriting ByteArrays

Bug: chromium:1228036
Change-Id: I5abe7009920d2c8f81f024c9ae7bb6b13607da1a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3054119
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75932}
parent ec717160
......@@ -513,6 +513,12 @@ Handle<Object> TranslatedValue::GetValue() {
// pass the verifier.
container_->EnsureObjectAllocatedAt(this);
// Finish any sweeping so that it becomes safe to overwrite the ByteArray
// headers.
// TODO(hpayer): Find a cleaner way to support a group of
// non-fully-initialized objects.
isolate()->heap()->mark_compact_collector()->EnsureSweepingCompleted();
// 2. Initialize the objects. If we have allocated only byte arrays
// for some objects, we now overwrite the byte arrays with the
// correct object fields. Note that this phase does not allocate
......@@ -1396,9 +1402,9 @@ TranslatedValue* TranslatedState::GetValueByObjectIndex(int object_index) {
}
Handle<HeapObject> TranslatedState::InitializeObjectAt(TranslatedValue* slot) {
slot = ResolveCapturedObject(slot);
DisallowGarbageCollection no_gc;
slot = ResolveCapturedObject(slot);
if (slot->materialization_state() != TranslatedValue::kFinished) {
std::stack<int> worklist;
worklist.push(slot->object_index());
......
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