[test] Remove FlagScope use in test-api.cc
Resetting the flag in the scope desctructor causes concurrent access to the flag value, triggering a TSAN failure when --stress-concurrent-inlining is on. The behaviour of the stress flag was changed in crrev.com/c/2824440 to improve test coverage, so this CL replaces the scope usage with simple flag assignment. Bug: v8:11740 Change-Id: Ie706edaa50486dd3b6eaabc9d1f26a8d03068418 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2882801 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#74461}
This commit is contained in:
parent
f2450cd701
commit
a44685da8d
@ -28192,12 +28192,12 @@ TEST(FastApiStackSlot) {
|
||||
#ifndef V8_LITE_MODE
|
||||
if (i::FLAG_jitless) return;
|
||||
|
||||
FLAG_SCOPE_EXTERNAL(opt);
|
||||
FLAG_SCOPE_EXTERNAL(turbo_fast_api_calls);
|
||||
FLAG_SCOPE_EXTERNAL(allow_natives_syntax);
|
||||
v8::internal::FLAG_opt = true;
|
||||
v8::internal::FLAG_turbo_fast_api_calls = true;
|
||||
v8::internal::FLAG_allow_natives_syntax = true;
|
||||
// Disable --always_opt, otherwise we haven't generated the necessary
|
||||
// feedback to go down the "best optimization" path for the fast call.
|
||||
UNFLAG_SCOPE_EXTERNAL(always_opt);
|
||||
v8::internal::FLAG_always_opt = false;
|
||||
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
||||
@ -28243,12 +28243,12 @@ TEST(FastApiCalls) {
|
||||
#ifndef V8_LITE_MODE
|
||||
if (i::FLAG_jitless) return;
|
||||
|
||||
FLAG_SCOPE_EXTERNAL(opt);
|
||||
FLAG_SCOPE_EXTERNAL(turbo_fast_api_calls);
|
||||
FLAG_SCOPE_EXTERNAL(allow_natives_syntax);
|
||||
v8::internal::FLAG_opt = true;
|
||||
v8::internal::FLAG_turbo_fast_api_calls = true;
|
||||
v8::internal::FLAG_allow_natives_syntax = true;
|
||||
// Disable --always_opt, otherwise we haven't generated the necessary
|
||||
// feedback to go down the "best optimization" path for the fast call.
|
||||
UNFLAG_SCOPE_EXTERNAL(always_opt);
|
||||
v8::internal::FLAG_always_opt = false;
|
||||
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
||||
|
Loading…
Reference in New Issue
Block a user