[sanitizer] Fix mallopt test on Android.

There is not a single common mallopt option between gnu/linux and
android, so simply use a random number there.

llvm-svn: 345394
This commit is contained in:
Evgeniy Stepanov 2018-10-26 15:13:20 +00:00
parent 4c06a6cc90
commit f4a6f6424d
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@
#include <malloc.h>
int main() {
int res = mallopt(M_ARENA_MAX, 0);
// Try a random mallopt option, possibly invalid.
int res = mallopt(-42, 0);
assert(res == 0 || res == 1);
}