diff --git a/BUILD.gn b/BUILD.gn index 26adeb7be9..9beefd6966 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -2350,6 +2350,8 @@ action("v8_dump_build_config") { "v8_control_flow_integrity=$v8_control_flow_integrity", "v8_target_cpu=\"$v8_target_cpu\"", "v8_enable_cet_shadow_stack=$v8_enable_cet_shadow_stack", + "v8_enable_verify_heap=$v8_enable_verify_heap", + "v8_enable_slow_dchecks=$v8_enable_slow_dchecks", ] if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { diff --git a/infra/mb/mb_config.pyl b/infra/mb/mb_config.pyl index c494280b72..60d1acd8e4 100644 --- a/infra/mb/mb_config.pyl +++ b/infra/mb/mb_config.pyl @@ -102,6 +102,7 @@ # Sanitizers. 'V8 Linux64 ASAN - builder': 'release_x64_asan', 'V8 Linux64 TSAN - builder': 'release_x64_tsan', + 'V8 Linux64 TSAN - debug builder': 'debug_x64_tsan_minimal_symbols', 'V8 Linux64 TSAN - no-concurrent-marking - builder': 'release_x64_tsan_no_cm', 'V8 Linux - arm64 - sim - CFI - builder': 'release_simulate_arm64_cfi', 'V8 Linux - arm64 - sim - MSAN - builder': 'release_simulate_arm64_msan', @@ -257,6 +258,7 @@ 'v8_linux_riscv32_compile_rel': 'release_simulate_riscv32', 'v8_linux64_riscv64_compile_rel': 'release_simulate_riscv64', 'v8_linux64_tsan_compile_rel': 'release_x64_tsan_minimal_symbols', + 'v8_linux64_tsan_compile_dbg': 'debug_x64_tsan_minimal_symbols', 'v8_linux64_tsan_no_cm_compile_rel': 'release_x64_tsan_no_cm', 'v8_linux64_tsan_isolates_compile_rel': 'release_x64_tsan_minimal_symbols', @@ -599,6 +601,9 @@ 'debug_trybot', 'x64', 'v8_enable_dict_property_const_tracking'], 'debug_x64_trybot_custom': [ 'debug_trybot', 'x64', 'v8_snapshot_custom'], + 'debug_x64_tsan_minimal_symbols': [ + 'debug_bot_no_slow_dchecks', 'minimal_symbols', 'x64', 'dcheck_always_on', + 'tsan', 'v8_disable_verify_heap', 'v8_fast_mksnapshot'], 'full_debug_x64': [ 'debug_bot', 'x64', 'v8_full_debug'], @@ -712,6 +717,12 @@ 'gn_args': 'is_debug=true v8_enable_backtrace=true', }, + 'debug_bot_no_slow_dchecks': { + 'mixins': [ + 'debug', 'shared', 'goma', 'v8_disable_slow_dchecks', + 'v8_optimized_debug', 'v8_enable_google_benchmark'], + }, + 'debug_bot': { 'mixins': [ 'debug', 'shared', 'goma', 'v8_enable_slow_dchecks', @@ -934,6 +945,10 @@ 'gn_args': 'v8_enable_runtime_call_stats=false', }, + 'v8_disable_verify_heap': { + 'gn_args': 'v8_enable_verify_heap=false', + }, + 'v8_expose_memory_corruption_api': { 'gn_args': 'v8_expose_memory_corruption_api=true', }, @@ -946,6 +961,10 @@ 'gn_args': 'v8_enable_slow_dchecks=true', }, + 'v8_disable_slow_dchecks': { + 'gn_args': 'v8_enable_slow_dchecks=false', + }, + 'v8_enable_javascript_promise_hooks': { 'gn_args': 'v8_enable_javascript_promise_hooks=true', }, @@ -981,6 +1000,10 @@ 'gn_args': 'v8_enable_vtunejit=true v8_enable_vtunetracemark=true', }, + 'v8_fast_mksnapshot': { + 'gn_args': 'v8_enable_fast_mksnapshot=true', + }, + 'v8_full_debug': { 'gn_args': 'v8_optimized_debug=false', }, diff --git a/infra/testing/builders.pyl b/infra/testing/builders.pyl index d6fcb8db83..2a330f6925 100644 --- a/infra/testing/builders.pyl +++ b/infra/testing/builders.pyl @@ -672,6 +672,18 @@ {'name': 'v8testing', 'variant': 'stress_concurrent_allocation', 'shards': 2}, ], }, + 'v8_linux64_tsan_dbg': { + 'swarming_dimensions' : { + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'benchmarks', 'shards': 2}, + {'name': 'mozilla', 'shards': 4}, + {'name': 'test262', 'variant': 'default', 'shards': 5}, + {'name': 'v8testing', 'shards': 12}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 10}, + ], + }, 'v8_linux64_tsan_no_cm_rel': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', @@ -1671,6 +1683,18 @@ {'name': 'v8testing', 'variant': 'stress_concurrent_allocation', 'shards': 2}, ], }, + 'V8 Linux64 TSAN - debug': { + 'swarming_dimensions' : { + 'os': 'Ubuntu-18.04', + }, + 'tests': [ + {'name': 'benchmarks', 'shards': 2}, + {'name': 'mozilla', 'shards': 4}, + {'name': 'test262', 'variant': 'default', 'shards': 5}, + {'name': 'v8testing', 'shards': 12}, + {'name': 'v8testing', 'variant': 'extra', 'shards': 10}, + ], + }, 'V8 Linux64 TSAN - stress-incremental-marking': { 'swarming_dimensions' : { 'os': 'Ubuntu-18.04', diff --git a/tools/testrunner/base_runner.py b/tools/testrunner/base_runner.py index 826ee321fc..a88d6fec05 100644 --- a/tools/testrunner/base_runner.py +++ b/tools/testrunner/base_runner.py @@ -90,16 +90,8 @@ TEST_MAP = { ModeConfig = namedtuple( 'ModeConfig', 'label flags timeout_scalefactor status_mode') -DEBUG_FLAGS = ["--nohard-abort", "--enable-slow-asserts", "--verify-heap"] RELEASE_FLAGS = ["--nohard-abort"] -DEBUG_MODE = ModeConfig( - label='debug', - flags=DEBUG_FLAGS, - timeout_scalefactor=4, - status_mode="debug", -) - RELEASE_MODE = ModeConfig( label='release', flags=RELEASE_FLAGS, @@ -390,9 +382,22 @@ class BaseTestRunner(object): print(">>> Latest GN build found: %s" % latest_config) return os.path.join(DEFAULT_OUT_GN, latest_config) + def _custom_debug_mode(self): + custom_debug_flags = ["--nohard-abort"] + if self.build_config.verify_heap: + custom_debug_flags += ["--verify-heap"] + if self.build_config.slow_dchecks: + custom_debug_flags += ["--enable-slow-asserts"] + return ModeConfig( + label='debug', + flags=custom_debug_flags, + timeout_scalefactor=4, + status_mode="debug", + ) + def _process_default_options(self): if self.build_config.is_debug: - self.mode_options = DEBUG_MODE + self.mode_options = self._custom_debug_mode() elif self.build_config.dcheck_always_on: self.mode_options = TRY_RELEASE_MODE else: diff --git a/tools/testrunner/build_config.py b/tools/testrunner/build_config.py index c6e22cb30f..cdc11681f8 100644 --- a/tools/testrunner/build_config.py +++ b/tools/testrunner/build_config.py @@ -44,6 +44,8 @@ class BuildConfig(object): # TODO(machenbach): We only have ubsan not ubsan_vptr. self.ubsan_vptr = build_config['is_ubsan_vptr'] self.verify_csa = build_config['v8_enable_verify_csa'] + self.verify_heap = build_config['v8_enable_verify_heap'] + self.slow_dchecks = build_config['v8_enable_slow_dchecks'] self.lite_mode = build_config['v8_enable_lite_mode'] self.pointer_compression = build_config['v8_enable_pointer_compression'] self.pointer_compression_shared_cage = build_config[ @@ -152,6 +154,8 @@ class BuildConfig(object): 'third_party_heap', 'webassembly', 'dict_property_const_tracking', + 'verify_heap', + 'slow_dchecks', ] detected_options = [attr for attr in attrs if getattr(self, attr, False)] return '\n'.join(detected_options) diff --git a/tools/testrunner/testdata/testroot1/out/build/v8_build_config.json b/tools/testrunner/testdata/testroot1/out/build/v8_build_config.json index 09f85ca772..9f1743780e 100644 --- a/tools/testrunner/testdata/testroot1/out/build/v8_build_config.json +++ b/tools/testrunner/testdata/testroot1/out/build/v8_build_config.json @@ -20,6 +20,8 @@ "v8_enable_conservative_stack_scanning": false, "v8_enable_concurrent_marking": true, "v8_enable_verify_csa": false, + "v8_enable_verify_heap": false, + "v8_enable_slow_dchecks": false, "v8_enable_lite_mode": false, "v8_enable_pointer_compression": true, "v8_enable_pointer_compression_shared_cage": true, diff --git a/tools/testrunner/testdata/testroot2/out/build/v8_build_config.json b/tools/testrunner/testdata/testroot2/out/build/v8_build_config.json index 7d1eb4b0f8..a0b2cb87b4 100644 --- a/tools/testrunner/testdata/testroot2/out/build/v8_build_config.json +++ b/tools/testrunner/testdata/testroot2/out/build/v8_build_config.json @@ -20,6 +20,8 @@ "v8_enable_conservative_stack_scanning": false, "v8_enable_concurrent_marking": true, "v8_enable_verify_csa": false, + "v8_enable_verify_heap": false, + "v8_enable_slow_dchecks": false, "v8_enable_lite_mode": false, "v8_enable_pointer_compression": false, "v8_enable_pointer_compression_shared_cage": false, diff --git a/tools/testrunner/testdata/testroot3/out/build/v8_build_config.json b/tools/testrunner/testdata/testroot3/out/build/v8_build_config.json index 09f85ca772..9f1743780e 100644 --- a/tools/testrunner/testdata/testroot3/out/build/v8_build_config.json +++ b/tools/testrunner/testdata/testroot3/out/build/v8_build_config.json @@ -20,6 +20,8 @@ "v8_enable_conservative_stack_scanning": false, "v8_enable_concurrent_marking": true, "v8_enable_verify_csa": false, + "v8_enable_verify_heap": false, + "v8_enable_slow_dchecks": false, "v8_enable_lite_mode": false, "v8_enable_pointer_compression": true, "v8_enable_pointer_compression_shared_cage": true, diff --git a/tools/testrunner/testdata/testroot5/out.gn/build/v8_build_config.json b/tools/testrunner/testdata/testroot5/out.gn/build/v8_build_config.json index 09f85ca772..9f1743780e 100644 --- a/tools/testrunner/testdata/testroot5/out.gn/build/v8_build_config.json +++ b/tools/testrunner/testdata/testroot5/out.gn/build/v8_build_config.json @@ -20,6 +20,8 @@ "v8_enable_conservative_stack_scanning": false, "v8_enable_concurrent_marking": true, "v8_enable_verify_csa": false, + "v8_enable_verify_heap": false, + "v8_enable_slow_dchecks": false, "v8_enable_lite_mode": false, "v8_enable_pointer_compression": true, "v8_enable_pointer_compression_shared_cage": true, diff --git a/tools/testrunner/testdata/testroot6/out/build/v8_build_config.json b/tools/testrunner/testdata/testroot6/out/build/v8_build_config.json index 09f85ca772..9f1743780e 100644 --- a/tools/testrunner/testdata/testroot6/out/build/v8_build_config.json +++ b/tools/testrunner/testdata/testroot6/out/build/v8_build_config.json @@ -20,6 +20,8 @@ "v8_enable_conservative_stack_scanning": false, "v8_enable_concurrent_marking": true, "v8_enable_verify_csa": false, + "v8_enable_verify_heap": false, + "v8_enable_slow_dchecks": false, "v8_enable_lite_mode": false, "v8_enable_pointer_compression": true, "v8_enable_pointer_compression_shared_cage": true,