Files
clang-p2996/compiler-rt/test/sanitizer_common/TestCases/Linux/mallopt.cpp
Vitaly Buka f9dd0166f1 [sanitizer] Disabled 2 tests on Android
They block bot upgrade to NDK 21.
2020-10-31 03:56:52 -07:00

15 lines
340 B
C++

// Check that mallopt does not return invalid values (ex. -1).
// RUN: %clangxx -O2 %s -o %t && %run %t
// Investigate why it fails with NDK 21.
// UNSUPPORTED: android
#include <assert.h>
#include <malloc.h>
int main() {
// Try a random mallopt option, possibly invalid.
int res = mallopt(-42, 0);
assert(res == 0 || res == 1);
}