mirror of
https://github.com/dart-lang/sdk
synced 2024-09-28 22:52:51 +00:00
[infra] Expand sanitizer test coverage.
TEST=ci Change-Id: I5e7709572f3ea0a16925996be8ab903b6eccc0e1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365100 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
dc372831e3
commit
06dd95bd8e
|
@ -9,9 +9,11 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
|
@ -898,7 +900,7 @@ DART_EXPORT void CallbackWithStruct(void (*f)(Struct8BytesNestedIntCopy)) {
|
|||
// Sanity test.
|
||||
DART_EXPORT intptr_t TestSimpleAddition(intptr_t (*add)(int, int)) {
|
||||
const intptr_t result = add(10, 20);
|
||||
std::cout << "result " << result << "\n";
|
||||
printf("result %" PRIdPTR "\n", result);
|
||||
CHECK_EQ(result, 30);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -688,6 +688,7 @@ class PendingCall {
|
|||
*response_length_ = response_length;
|
||||
|
||||
printf("C : Notify result ready.\n");
|
||||
std::unique_lock<std::mutex> lock(mutex);
|
||||
notified = true;
|
||||
cv.notify_one();
|
||||
}
|
||||
|
|
|
@ -2550,7 +2550,7 @@ Definition* BinaryIntegerOpInstr::Canonicalize(FlowGraph* flow_graph) {
|
|||
break;
|
||||
|
||||
case Token::kMOD:
|
||||
if (std::abs(rhs) == 1) {
|
||||
if ((rhs == -1) || (rhs == 1)) {
|
||||
return flow_graph->TryCreateConstantReplacementFor(this,
|
||||
Object::smi_zero());
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
// This file exercises the sample files so that they are tested.
|
||||
//
|
||||
// SharedObjects=ffi_test_dynamic_library ffi_test_functions
|
||||
// Environment=MSAN_OPTIONS=handle_segv=0:detect_stack_use_after_return=1:allocator_may_return_null=1
|
||||
// Environment=TSAN_OPTIONS=handle_segv=0:detect_stack_use_after_return=1:allocator_may_return_null=1
|
||||
|
||||
import 'sample_ffi_bitfield.dart' as bitfield;
|
||||
import 'sample_ffi_data.dart' as data;
|
||||
|
|
|
@ -1250,6 +1250,7 @@
|
|||
"builders": [
|
||||
"vm-asan-linux-release-x64",
|
||||
"vm-msan-linux-release-x64",
|
||||
"vm-tsan-linux-release-x64",
|
||||
"vm-ubsan-linux-release-x64"
|
||||
],
|
||||
"meta": {
|
||||
|
@ -1266,42 +1267,7 @@
|
|||
{
|
||||
"name": "vm tests",
|
||||
"arguments": [
|
||||
"-nvm-${sanitizer}-${system}-${mode}-${arch}",
|
||||
"corelib",
|
||||
"ffi",
|
||||
"language",
|
||||
"lib",
|
||||
"samples",
|
||||
"standalone",
|
||||
"utils",
|
||||
"vm"
|
||||
],
|
||||
"fileset": "vm",
|
||||
"shards": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"builders": [
|
||||
"vm-tsan-linux-release-x64"
|
||||
],
|
||||
"meta": {
|
||||
"description": "This configuration is used by the VM/JIT builders with sanitizers."
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"name": "build dart",
|
||||
"script": "tools/build.py",
|
||||
"arguments": [
|
||||
"runtime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vm tests",
|
||||
"arguments": [
|
||||
"-nvm-${sanitizer}-${system}-${mode}-${arch}",
|
||||
"vm",
|
||||
"standalone"
|
||||
"-nvm-${sanitizer}-${system}-${mode}-${arch}"
|
||||
],
|
||||
"fileset": "vm",
|
||||
"shards": 8
|
||||
|
@ -1312,6 +1278,7 @@
|
|||
"builders": [
|
||||
"vm-aot-asan-linux-release-x64",
|
||||
"vm-aot-msan-linux-release-x64",
|
||||
"vm-aot-tsan-linux-release-x64",
|
||||
"vm-aot-ubsan-linux-release-x64"
|
||||
],
|
||||
"meta": {
|
||||
|
@ -1329,40 +1296,10 @@
|
|||
{
|
||||
"name": "vm tests",
|
||||
"arguments": [
|
||||
"-nvm-aot-${sanitizer}-${system}-${mode}-${arch}",
|
||||
"vm",
|
||||
"standalone"
|
||||
"-nvm-aot-${sanitizer}-${system}-${mode}-${arch}"
|
||||
],
|
||||
"fileset": "vm",
|
||||
"shards": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"builders": [
|
||||
"vm-aot-tsan-linux-release-x64"
|
||||
],
|
||||
"meta": {
|
||||
"description": "This configuration is used by the VM/AOT builders with sanitizers."
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"name": "build dart",
|
||||
"script": "tools/build.py",
|
||||
"arguments": [
|
||||
"runtime",
|
||||
"runtime_precompiled"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vm tests",
|
||||
"arguments": [
|
||||
"-nvm-aot-${sanitizer}-${system}-${mode}-${arch}",
|
||||
"vm",
|
||||
"standalone"
|
||||
],
|
||||
"fileset": "vm",
|
||||
"shards": 8
|
||||
"shards": 12
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue