File tree 5 files changed +12
-70
lines changed
5 files changed +12
-70
lines changed Original file line number Diff line number Diff line change 9
9
10
10
#include < stdarg.h>
11
11
#include < stddef.h>
12
+ #include < stdio.h>
12
13
#include < stdlib.h>
13
14
#include < sys/types.h>
14
15
16
+ #include < cinttypes>
15
17
#include < cmath>
16
18
#include < iostream>
17
19
#include < limits>
@@ -898,7 +900,7 @@ DART_EXPORT void CallbackWithStruct(void (*f)(Struct8BytesNestedIntCopy)) {
898
900
// Sanity test.
899
901
DART_EXPORT intptr_t TestSimpleAddition (intptr_t (*add)(int , int )) {
900
902
const intptr_t result = add (10 , 20 );
901
- std::cout << " result " << result << " \n " ;
903
+ printf ( " result % " PRIdPTR " \n " , result) ;
902
904
CHECK_EQ (result, 30 );
903
905
return 0 ;
904
906
}
Original file line number Diff line number Diff line change @@ -688,6 +688,7 @@ class PendingCall {
688
688
*response_length_ = response_length;
689
689
690
690
printf (" C : Notify result ready.\n " );
691
+ std::unique_lock<std::mutex> lock (mutex);
691
692
notified = true ;
692
693
cv.notify_one ();
693
694
}
Original file line number Diff line number Diff line change @@ -2550,7 +2550,7 @@ Definition* BinaryIntegerOpInstr::Canonicalize(FlowGraph* flow_graph) {
2550
2550
break ;
2551
2551
2552
2552
case Token::kMOD :
2553
- if (std::abs (rhs) == 1 ) {
2553
+ if ((rhs == - 1 ) || (rhs == 1 ) ) {
2554
2554
return flow_graph->TryCreateConstantReplacementFor (this ,
2555
2555
Object::smi_zero ());
2556
2556
}
Original file line number Diff line number Diff line change 5
5
// This file exercises the sample files so that they are tested.
6
6
//
7
7
// SharedObjects=ffi_test_dynamic_library ffi_test_functions
8
+ // Environment=MSAN_OPTIONS=handle_segv=0:detect_stack_use_after_return=1:allocator_may_return_null=1
9
+ // Environment=TSAN_OPTIONS=handle_segv=0:detect_stack_use_after_return=1:allocator_may_return_null=1
8
10
9
11
import 'sample_ffi_bitfield.dart' as bitfield;
10
12
import 'sample_ffi_data.dart' as data;
Original file line number Diff line number Diff line change 1250
1250
"builders" : [
1251
1251
" vm-asan-linux-release-x64" ,
1252
1252
" vm-msan-linux-release-x64" ,
1253
+ " vm-tsan-linux-release-x64" ,
1253
1254
" vm-ubsan-linux-release-x64"
1254
1255
],
1255
1256
"meta" : {
1266
1267
{
1267
1268
"name" : " vm tests" ,
1268
1269
"arguments" : [
1269
- " -nvm-${sanitizer}-${system}-${mode}-${arch}" ,
1270
- " corelib" ,
1271
- " ffi" ,
1272
- " language" ,
1273
- " lib" ,
1274
- " samples" ,
1275
- " standalone" ,
1276
- " utils" ,
1277
- " vm"
1278
- ],
1279
- "fileset" : " vm" ,
1280
- "shards" : 4
1281
- }
1282
- ]
1283
- },
1284
- {
1285
- "builders" : [
1286
- " vm-tsan-linux-release-x64"
1287
- ],
1288
- "meta" : {
1289
- "description" : " This configuration is used by the VM/JIT builders with sanitizers."
1290
- },
1291
- "steps" : [
1292
- {
1293
- "name" : " build dart" ,
1294
- "script" : " tools/build.py" ,
1295
- "arguments" : [
1296
- " runtime"
1297
- ]
1298
- },
1299
- {
1300
- "name" : " vm tests" ,
1301
- "arguments" : [
1302
- " -nvm-${sanitizer}-${system}-${mode}-${arch}" ,
1303
- " vm" ,
1304
- " standalone"
1270
+ " -nvm-${sanitizer}-${system}-${mode}-${arch}"
1305
1271
],
1306
1272
"fileset" : " vm" ,
1307
1273
"shards" : 8
1312
1278
"builders" : [
1313
1279
" vm-aot-asan-linux-release-x64" ,
1314
1280
" vm-aot-msan-linux-release-x64" ,
1281
+ " vm-aot-tsan-linux-release-x64" ,
1315
1282
" vm-aot-ubsan-linux-release-x64"
1316
1283
],
1317
1284
"meta" : {
1329
1296
{
1330
1297
"name" : " vm tests" ,
1331
1298
"arguments" : [
1332
- " -nvm-aot-${sanitizer}-${system}-${mode}-${arch}" ,
1333
- " vm" ,
1334
- " standalone"
1335
- ],
1336
- "fileset" : " vm" ,
1337
- "shards" : 4
1338
- }
1339
- ]
1340
- },
1341
- {
1342
- "builders" : [
1343
- " vm-aot-tsan-linux-release-x64"
1344
- ],
1345
- "meta" : {
1346
- "description" : " This configuration is used by the VM/AOT builders with sanitizers."
1347
- },
1348
- "steps" : [
1349
- {
1350
- "name" : " build dart" ,
1351
- "script" : " tools/build.py" ,
1352
- "arguments" : [
1353
- " runtime" ,
1354
- " runtime_precompiled"
1355
- ]
1356
- },
1357
- {
1358
- "name" : " vm tests" ,
1359
- "arguments" : [
1360
- " -nvm-aot-${sanitizer}-${system}-${mode}-${arch}" ,
1361
- " vm" ,
1362
- " standalone"
1299
+ " -nvm-aot-${sanitizer}-${system}-${mode}-${arch}"
1363
1300
],
1364
1301
"fileset" : " vm" ,
1365
- "shards" : 8
1302
+ "shards" : 12
1366
1303
}
1367
1304
]
1368
1305
},
You can’t perform that action at this time.
0 commit comments