summaryrefslogtreecommitdiff
path: root/deps/jemalloc/test/integration/overflow.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/jemalloc/test/integration/overflow.c')
-rw-r--r--deps/jemalloc/test/integration/overflow.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/deps/jemalloc/test/integration/overflow.c b/deps/jemalloc/test/integration/overflow.c
index 6a9785b2e..748ebb677 100644
--- a/deps/jemalloc/test/integration/overflow.c
+++ b/deps/jemalloc/test/integration/overflow.c
@@ -1,5 +1,15 @@
#include "test/jemalloc_test.h"
+/*
+ * GCC "-Walloc-size-larger-than" warning detects when one of the memory
+ * allocation functions is called with a size larger than the maximum size that
+ * they support. Here we want to explicitly test that the allocation functions
+ * do indeed fail properly when this is the case, which triggers the warning.
+ * Therefore we disable the warning for these tests.
+ */
+JEMALLOC_DIAGNOSTIC_PUSH
+JEMALLOC_DIAGNOSTIC_IGNORE_ALLOC_SIZE_LARGER_THAN
+
TEST_BEGIN(test_overflow) {
unsigned nlextents;
size_t mib[4];
@@ -39,6 +49,9 @@ TEST_BEGIN(test_overflow) {
}
TEST_END
+/* Re-enable the "-Walloc-size-larger-than=" warning */
+JEMALLOC_DIAGNOSTIC_POP
+
int
main(void) {
return test(