mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 15:21:54 +00:00
[vm] Address TSAN errors in FFI tests.
Bug: https://github.com/dart-lang/sdk/issues/39611 Change-Id: I34556155d1d20ab48af952ddc4fdb6959db960d5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140250 Reviewed-by: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
parent
c58ad1fadf
commit
13ec6ef5ff
|
@ -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<Isolate*>(arg);
|
||||
if (isolate->mutator_thread()->execution_state() ==
|
||||
if (isolate->mutator_thread()->execution_state_cross_thread_for_testing() ==
|
||||
Thread::kThreadInNative) {
|
||||
return arg;
|
||||
} else {
|
||||
|
|
|
@ -751,6 +751,11 @@ class Thread : public ThreadState {
|
|||
ExecutionState execution_state() const {
|
||||
return static_cast<ExecutionState>(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<ExecutionState>(execution_state_);
|
||||
}
|
||||
void set_execution_state(ExecutionState state) {
|
||||
execution_state_ = static_cast<uword>(state);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue