aboutsummaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/Linux/mallopt.cc
blob: 0aa9f98447da6639b2159e8997ba975b28ece3ed (plain)
1
2
3
4
5
6
7
8
9
// Check that mallopt does not return invalid values (ex. -1).
// RUN: %clangxx -O2 %s -o %t && %run %t
#include <assert.h>
#include <malloc.h>

int main() {
  int res = mallopt(M_ARENA_MAX, 0);
  assert(res == 0 || res == 1);
}