File tree 3 files changed +18
-17
lines changed
3 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ case $HOST_TARGET in
108
108
MIRI_TEST_TARGET=aarch64-unknown-linux-gnu run_tests
109
109
MIRI_TEST_TARGET=aarch64-apple-darwin run_tests
110
110
MIRI_TEST_TARGET=i686-pc-windows-gnu run_tests
111
- MIRI_TEST_TARGET=x86_64-unknown-freebsd run_tests_minimal hello integer vec panic/panic concurrency/simple pthreads-threadname libc-getentropy libc-getrandom libc-reallocarray libc- misc atomic env/var
111
+ MIRI_TEST_TARGET=x86_64-unknown-freebsd run_tests_minimal hello integer vec panic/panic concurrency/simple pthreads-threadname libc-getentropy libc-getrandom libc-misc atomic env/var
112
112
MIRI_TEST_TARGET=aarch64-linux-android run_tests_minimal hello integer vec panic/panic
113
113
MIRI_TEST_TARGET=wasm32-wasi run_tests_minimal no_std integer strings wasm
114
114
MIRI_TEST_TARGET=wasm32-unknown-unknown run_tests_minimal no_std integer strings wasm
Original file line number Diff line number Diff line change @@ -390,6 +390,19 @@ fn test_dlsym() {
390
390
assert_eq ! ( errno, libc:: EBADF ) ;
391
391
}
392
392
393
+ #[ cfg( not( target_os = "macos" ) ) ]
394
+ fn test_reallocarray ( ) {
395
+ unsafe {
396
+ let mut p = libc:: reallocarray ( std:: ptr:: null_mut ( ) , 4096 , 2 ) ;
397
+ assert ! ( !p. is_null( ) ) ;
398
+ libc:: free ( p) ;
399
+ p = libc:: malloc ( 16 ) ;
400
+ let r = libc:: reallocarray ( p, 2 , 32 ) ;
401
+ assert ! ( !r. is_null( ) ) ;
402
+ libc:: free ( r) ;
403
+ }
404
+ }
405
+
393
406
fn main ( ) {
394
407
test_posix_gettimeofday ( ) ;
395
408
@@ -412,6 +425,10 @@ fn main() {
412
425
test_memcpy ( ) ;
413
426
test_strcpy ( ) ;
414
427
428
+ #[ cfg( not( target_os = "macos" ) ) ] // reallocarray does not exist on macOS
429
+ test_reallocarray ( ) ;
430
+
431
+ // These are Linux-specific
415
432
#[ cfg( target_os = "linux" ) ]
416
433
{
417
434
test_posix_fadvise ( ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments