Commit 7faacf76 authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[heap] Fix NewEmptyCode initialisation

NewEmptyCode was missing the initialisation of three fields.
These were crashing when running with --verify-heap.

Bug: v8:11872
Change-Id: I679f0d2d68c5594b0e9700b26c031483c3d46b68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2999095
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75511}
parent e268f3ab
...@@ -316,6 +316,12 @@ MaybeHandle<Code> Factory::NewEmptyCode(CodeKind kind, int buffer_size) { ...@@ -316,6 +316,12 @@ MaybeHandle<Code> Factory::NewEmptyCode(CodeKind kind, int buffer_size) {
raw_code.set_raw_metadata_size(buffer_size); raw_code.set_raw_metadata_size(buffer_size);
raw_code.set_relocation_info(*empty_byte_array()); raw_code.set_relocation_info(*empty_byte_array());
raw_code.initialize_flags(kind, false, 0, kIsNotOffHeapTrampoline); raw_code.initialize_flags(kind, false, 0, kIsNotOffHeapTrampoline);
raw_code.set_builtin_id(Builtin::kNoBuiltinId);
auto code_data_container =
Handle<CodeDataContainer>::cast(trampoline_trivial_code_data_container());
raw_code.set_code_data_container(*code_data_container, kReleaseStore);
raw_code.set_deoptimization_data(*DeoptimizationData::Empty(isolate()));
raw_code.set_bytecode_offset_table(*empty_byte_array());
raw_code.set_handler_table_offset(0); raw_code.set_handler_table_offset(0);
raw_code.set_constant_pool_offset(0); raw_code.set_constant_pool_offset(0);
raw_code.set_code_comments_offset(0); raw_code.set_code_comments_offset(0);
......
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