Skip to content

Commit 436d143

Browse files
committed
test/normalize: disable rlimit under ASAN
AddressSanitizer requires a boatload of virt. Disable limitations in this case, so the test will run, if only in a meaningless way.
1 parent fbe14d6 commit 436d143

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/normalize.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010

1111
#include "testutils/domts.h"
1212

13-
#ifdef __linux__
13+
#if defined(__has_feature)
14+
# if __has_feature(address_sanitizer)
15+
# define __SANITIZE_ADDRESS__
16+
# endif
17+
#endif
18+
19+
#if defined(__linux__) && !defined(__SANITIZE_ADDRESS__)
1420

1521
#include <sys/time.h>
1622
#include <sys/resource.h>
@@ -187,4 +193,4 @@ int main(int argc, char **argv)
187193

188194
printf("\nPASS\n");
189195
return 0;
190-
}
196+
}

0 commit comments

Comments
 (0)