Commit d1f2b2d8 authored by Sunny Sachanandani's avatar Sunny Sachanandani Committed by V8 LUCI CQ

Revert "[snapshot] Turn alignment DCHECKS into CHECKS"

This reverts commit 83f60359.

Reason for revert: RB-Dev crash - crbug.com/1338687

Original change's description:
> [snapshot] Turn alignment DCHECKS into CHECKS
>
> This is a temporary change to get more detailed crash reports for
> further investigations.
>
> Bug: chromium:1330861
> Change-Id: Ifdd8d61692577dffd54d07fadb65575a5c30dcd3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3707592
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81262}

Bug: chromium:1330861, chromium:1338687
Change-Id: I845aee5cfe02dee399851484d1a72f73dc56f1f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3718943
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81327}
parent 2071ce3b
......@@ -423,20 +423,6 @@ void Deserializer<IsolateT>::PostProcessNewJSReceiver(
HeapObject::RequiredAlignment(map)));
}
namespace {
// TODO(cbruni, 1330861): Remove once we get enough crash data.
template <typename IsolateT>
V8_NOINLINE void CheckAlignment(HeapObject raw_obj, Map raw_map,
IsolateT* isolate,
AllocationAlignment alignment, int filler_size,
InstanceType instance_type) {
CHECK_EQ(raw_map, raw_obj.map(isolate));
CHECK_EQ(0, Heap::GetFillToAlign(raw_obj.address(), alignment));
CHECK_EQ(filler_size, 0);
CHECK_LE(0, static_cast<int>(instance_type));
}
} // namespace
template <typename IsolateT>
void Deserializer<IsolateT>::PostProcessNewObject(Handle<Map> map,
Handle<HeapObject> obj,
......@@ -445,18 +431,12 @@ void Deserializer<IsolateT>::PostProcessNewObject(Handle<Map> map,
Map raw_map = *map;
DCHECK_EQ(raw_map, obj->map(isolate_));
InstanceType instance_type = raw_map.instance_type();
HeapObject raw_obj = *obj;
// Check alignment.
// TODO(cbruni, 1330861): Revert to DCHECK once we know the root cause
AllocationAlignment alignment = HeapObject::RequiredAlignment(raw_map);
int filler_size = Heap::GetFillToAlign(raw_obj.address(), alignment);
if (filler_size != 0) {
CheckAlignment(raw_obj, raw_map, isolate_, alignment, filler_size,
raw_map.instance_type());
}
DCHECK_EQ(0, Heap::GetFillToAlign(obj->address(),
HeapObject::RequiredAlignment(raw_map)));
HeapObject raw_obj = *obj;
DCHECK_IMPLIES(deserializing_user_code(), should_rehash());
if (should_rehash()) {
if (InstanceTypeChecker::IsString(instance_type)) {
// Uninitialize hash field as we need to recompute the hash.
......
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