diff --git a/runtime/vm/native_api_impl.cc b/runtime/vm/native_api_impl.cc index 895d5d680b4..75d9cd69da1 100644 --- a/runtime/vm/native_api_impl.cc +++ b/runtime/vm/native_api_impl.cc @@ -269,7 +269,7 @@ DART_EXPORT void* Dart_ExecuteInternalCommand(const char* command, void* arg) { } else if (strcmp(command, "is-mutator-in-native") == 0) { Isolate* const isolate = reinterpret_cast(arg); - if (isolate->mutator_thread()->execution_state() == + if (isolate->mutator_thread()->execution_state_cross_thread_for_testing() == Thread::kThreadInNative) { return arg; } else { diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h index c1b0d03507d..1132a6e1776 100644 --- a/runtime/vm/thread.h +++ b/runtime/vm/thread.h @@ -751,6 +751,11 @@ class Thread : public ThreadState { ExecutionState execution_state() const { return static_cast(execution_state_); } + // Normally execution state is only accessed for the current thread. + NO_SANITIZE_THREAD + ExecutionState execution_state_cross_thread_for_testing() const { + return static_cast(execution_state_); + } void set_execution_state(ExecutionState state) { execution_state_ = static_cast(state); } diff --git a/tests/ffi_2/ffi_2.status b/tests/ffi_2/ffi_2.status index 8db64fb4050..c138d83c04c 100644 --- a/tests/ffi_2/ffi_2.status +++ b/tests/ffi_2/ffi_2.status @@ -2,9 +2,6 @@ # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. -[ $builder_tag == asan ] -data_not_asan_test: SkipByDesign # This test tries to allocate too much memory on purpose. - [ $system == android ] *: Pass, Slow # https://github.com/dart-lang/sdk/issues/38489 @@ -17,6 +14,9 @@ data_not_asan_test: SkipByDesign # This test tries to allocate too much memory o [ $arch == simarm || $arch == simarm64 ] *: Skip # FFI not yet supported on the arm simulator. +[ $builder_tag == asan || $builder_tag == msan || $builder_tag == tsan ] +data_not_asan_test: SkipByDesign # This test tries to allocate too much memory on purpose. + # These tests trigger and catch an abort (intentionally) and terminate the VM. # They're incompatible with ASAN because not all memory is freed when aborting and # with AppJit because the abort the VM before it can generate a snapshot.