1 // Check that mallopt does not return invalid values (ex. -1).
2 // RUN: %clangxx -O2 %s -o %t && %run %t
3 #include <assert.h>
4 #include <malloc.h>
5 
6 int main() {
7   // Try a random mallopt option, possibly invalid.
8   int res = mallopt(-42, 0);
9   assert(res == 0 || res == 1);
10 }
11