diff --git a/.bazelrc b/.bazelrc index 2af5b640afa..06fa70ea4c0 100644 --- a/.bazelrc +++ b/.bazelrc @@ -61,6 +61,9 @@ build --host_per_file_copt='external/zlib@-Wno-unknown-warning-option,-Wnodeprec build --per_file_copt=external/com_google_tcmalloc@-DANNOTATE_MEMORY_IS_INITIALIZED=ABSL_ANNOTATE_MEMORY_IS_INITIALIZED build --per_file_copt=external/com_google_protobuf@-Wno-deprecated-declarations,-Wno-deprecated-pragma build --host_per_file_copt=external/com_google_protobuf@-Wno-deprecated-declarations,-Wno-deprecated-pragma +# Enables heap allocation debug checks for local handles. +# Ref: https://chromium-review.googlesource.com/c/v8/v8/+/4905902 +build --copt='-DV8_ENABLE_LOCAL_OFF_STACK_CHECK' # Increasing the optimization level of some portions of V8 significantly speeds up Python tests # in GitHub Actions. This is an optional performance hack and shouly only be used in CI. diff --git a/compile_flags.txt b/compile_flags.txt index bb0790efd14..d939fe184e3 100644 --- a/compile_flags.txt +++ b/compile_flags.txt @@ -85,6 +85,7 @@ -DV8_ENABLE_CHECKS -DV8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA -DV8_ENABLE_LAZY_SOURCE_POSITIONS +-DV8_ENABLE_LOCAL_OFF_STACK_CHECK -DV8_ENABLE_TURBOFAN -DV8_ENABLE_WEBASSEMBLY -DV8_HAVE_TARGET_OS