brintos

brintos / llvm-project-archived public Read only

0
0
Text · 340 B · 37d1ebb Raw
15 lines · cpp
1// Check that mallopt does not return invalid values (ex. -1).2// RUN: %clangxx -O2 %s -o %t && %run %t3 4// Investigate why it fails with NDK 21.5// UNSUPPORTED: android6 7#include <assert.h>8#include <malloc.h>9 10int main() {11  // Try a random mallopt option, possibly invalid.12  int res = mallopt(-42, 0);13  assert(res == 0 || res == 1);14}15