Remove FlagScope use in test-js-to-wasm.cc
Flag reads from background threads are unfortunately scattered and hard to completely avoid in the current state of V8. An example TSAN failure: ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN/36369/overview The root cause is that FlagScope destruction modifies flag values on the main thread, racing with flag reads from the background thread. In cctests, there's no need to reset flags back to initial values at the end of tests. Let's simply remove the problematic flag scopes. Bug: v8:11658 Change-Id: I59ed3794ddc9ed570772726a423dc22afc4dc207 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843346 Auto-Submit: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#74082}
This commit is contained in:
parent
92b6c12d04
commit
a8a8e6b797
@ -262,12 +262,13 @@ enum TestMode { kJSToWasmInliningDisabled, kJSToWasmInliningEnabled };
|
||||
class FastJSWasmCallTester {
|
||||
public:
|
||||
FastJSWasmCallTester()
|
||||
: allow_natives_syntax_(&i::FLAG_allow_natives_syntax, true),
|
||||
inline_js_wasm_calls_(&i::FLAG_turbo_inline_js_wasm_calls, true),
|
||||
stress_background_compile_(&i::FLAG_stress_background_compile, false),
|
||||
allocator_(),
|
||||
: allocator_(),
|
||||
zone_(&allocator_, ZONE_NAME),
|
||||
builder_(zone_.New<WasmModuleBuilder>(&zone_)) {}
|
||||
builder_(zone_.New<WasmModuleBuilder>(&zone_)) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_turbo_inline_js_wasm_calls = true;
|
||||
i::FLAG_stress_background_compile = false;
|
||||
}
|
||||
|
||||
void DeclareCallback(const char* name, FunctionSig* signature,
|
||||
const char* module) {
|
||||
@ -742,9 +743,6 @@ class FastJSWasmCallTester {
|
||||
return string_stream.str();
|
||||
}
|
||||
|
||||
i::FlagScope<bool> allow_natives_syntax_;
|
||||
i::FlagScope<bool> inline_js_wasm_calls_;
|
||||
i::FlagScope<bool> stress_background_compile_;
|
||||
AccountingAllocator allocator_;
|
||||
Zone zone_;
|
||||
WasmModuleBuilder* builder_;
|
||||
|
Loading…
Reference in New Issue
Block a user