Changeset View
Changeset View
Standalone View
Standalone View
test/scudo/memalign.c
// RUN: %clang_scudo %s -o %t | // RUN: %clang_scudo %s -o %t | ||||
// RUN: %run %t valid 2>&1 | // RUN: %run %t valid 2>&1 | ||||
// RUN: not %run %t invalid 2>&1 | // RUN: not %run %t invalid 2>&1 | ||||
// RUN: %env_scudo_opts=allocator_may_return_null=1 %run %t invalid 2>&1 | // RUN: %env_scudo_opts=allocator_may_return_null=1 %run %t invalid 2>&1 | ||||
// RUN: not %run %t double-free 2>&1 | FileCheck --check-prefix=CHECK-double-free %s | // RUN: not %run %t double-free 2>&1 | FileCheck --check-prefix=CHECK-double-free %s | ||||
// RUN: %env_scudo_opts=DeallocationTypeMismatch=1 not %run %t realloc 2>&1 | FileCheck --check-prefix=CHECK-realloc %s | // RUN: %env_scudo_opts=DeallocationTypeMismatch=1 not %run %t realloc 2>&1 | FileCheck --check-prefix=CHECK-realloc %s | ||||
// RUN: %env_scudo_opts=DeallocationTypeMismatch=0 %run %t realloc 2>&1 | // RUN: %env_scudo_opts=DeallocationTypeMismatch=0 %run %t realloc 2>&1 | ||||
// UNSUPPORTED: win32 | |||||
// Tests that the various aligned allocation functions work as intended. Also | // Tests that the various aligned allocation functions work as intended. Also | ||||
// tests for the condition where the alignment is not a power of 2. | // tests for the condition where the alignment is not a power of 2. | ||||
#include <assert.h> | #include <assert.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <malloc.h> | #include <malloc.h> | ||||
#include <stdint.h> | #include <stdint.h> | ||||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |