Commit 6a6ef5c8 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[compiler] Fix more tsan issues

- Allow pass/fail for all test-heap/LeakNativeContextVia* tests in
stress_concurrent_inlining mode.
- Don't capture stack locations in lambdas passed between threads.

Bug: v8:7790,v8:11650
Change-Id: I6c23b527d5f96f2f4b2354d16f39d832dea17e71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2827895
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73974}
parent d4aafa40
...@@ -709,11 +709,9 @@ ...@@ -709,11 +709,9 @@
'test-cpu-profiler/TracingCpuProfiler': [PASS, FAIL], 'test-cpu-profiler/TracingCpuProfiler': [PASS, FAIL],
# crbug.com/v8/11513: Flakily failing due to the additional compile task. # crbug.com/v8/11513: Flakily failing due to the additional compile task.
'test-heap/EnsureAllocationSiteDependentCodesProcessed': [PASS, FAIL], 'test-heap/EnsureAllocationSiteDependentCodesProcessed': [PASS, FAIL],
'test-heap/LeakNativeContextViaMapProto': [PASS, FAIL], 'test-heap/LeakNativeContextVia*': [PASS, FAIL],
'test-heap/NewSpaceObjectsInOptimizedCode': [PASS, FAIL], 'test-heap/NewSpaceObjectsInOptimizedCode': [PASS, FAIL],
'test-heap/ObjectsInEagerlyDeoptimizedCodeAreWeak': [PASS, FAIL], 'test-heap/ObjectsInEagerlyDeoptimizedCodeAreWeak': [PASS, FAIL],
# crbug.com/v8/11650: Flakily failing after increased coverage.
'test-js-to-wasm/*': [PASS, FAIL],
}], # variant == stress_concurrent_inlining }], # variant == stress_concurrent_inlining
] ]
...@@ -591,23 +591,25 @@ class FastJSWasmCallTester { ...@@ -591,23 +591,25 @@ class FastJSWasmCallTester {
v8::Local<v8::Value> CompileRunWithJSWasmCallNodeObserver( v8::Local<v8::Value> CompileRunWithJSWasmCallNodeObserver(
const std::string& js_code) { const std::string& js_code) {
// Note: Make sure to not capture stack locations (e.g. `this`) here since
// these lambdas are executed on another thread.
const auto test_mode = test_mode_;
compiler::ModificationObserver js_wasm_call_observer( compiler::ModificationObserver js_wasm_call_observer(
[](const compiler::Node* node) { [](const compiler::Node* node) {
CHECK_EQ(compiler::IrOpcode::kJSCall, node->opcode()); CHECK_EQ(compiler::IrOpcode::kJSCall, node->opcode());
}, },
[this](const compiler::Node* node, [test_mode](const compiler::Node* node,
const compiler::ObservableNodeState& old_state) const compiler::ObservableNodeState& old_state)
-> compiler::NodeObserver::Observation { -> compiler::NodeObserver::Observation {
if (old_state.opcode() != node->opcode()) { if (old_state.opcode() != node->opcode()) {
CHECK_EQ(compiler::IrOpcode::kJSCall, old_state.opcode()); CHECK_EQ(compiler::IrOpcode::kJSCall, old_state.opcode());
// JS-to-Wasm inlining is disabled when targeting 32 bits if the // JS-to-Wasm inlining is disabled when targeting 32 bits if the
// Wasm function signature contains an I64. // Wasm function signature contains an I64.
if (test_mode_ == kJSToWasmInliningEnabled) { CHECK_EQ(test_mode == kJSToWasmInliningEnabled
CHECK_EQ(compiler::IrOpcode::kJSWasmCall, node->opcode()); ? compiler::IrOpcode::kJSWasmCall
} else { : compiler::IrOpcode::kCall,
CHECK_EQ(compiler::IrOpcode::kCall, node->opcode()); node->opcode());
}
return compiler::NodeObserver::Observation::kStop; return compiler::NodeObserver::Observation::kStop;
} }
......
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