1 | // Check that mallopt does not return invalid values (ex. -1). |
---|---|
2 | // RUN: %clangxx -O2 %s -o %t && %run %t |
3 | |
4 | // Investigate why it fails with NDK 21. |
5 | // UNSUPPORTED: android |
6 | |
7 | #include <assert.h> |
8 | #include <malloc.h> |
9 | |
10 | int main() { |
11 | // Try a random mallopt option, possibly invalid. |
12 | int res = mallopt(param: -42, val: 0); |
13 | assert(res == 0 || res == 1); |
14 | } |
15 |