diff options
author | Danny Lin <danny@kdrag0n.dev> | 2021-10-11 20:49:26 -0700 |
---|---|---|
committer | alk3pInjection <5e147612@kscope.ink> | 2022-05-08 12:40:50 +0800 |
commit | e36e52fb6ec54bc47e17e849ca5a3a301eaa6d05 (patch) | |
tree | 854d309be91bcdd38fe46ea8ad0f906bef39d017 /test/integration/rallocx.c | |
parent | 6d4d27fd2651ed114386b89c2d251b816a849460 (diff) | |
parent | ea6b3e973b477b8061e0076bb257dbd7f3faa756 (diff) |
Merge tag '5.2.1' into HEAD
Release
Change-Id: I269b861cb81499b78f13dc2e88827f13ef5a207d
Diffstat (limited to 'test/integration/rallocx.c')
-rw-r--r-- | test/integration/rallocx.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/integration/rallocx.c b/test/integration/rallocx.c index 7821ca5f..08ed08d3 100644 --- a/test/integration/rallocx.c +++ b/test/integration/rallocx.c @@ -208,6 +208,16 @@ TEST_BEGIN(test_lg_align_and_zero) { } TEST_END +/* + * 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) { size_t largemax; void *p; @@ -234,6 +244,9 @@ TEST_BEGIN(test_overflow) { } TEST_END +/* Re-enable the "-Walloc-size-larger-than=" warning */ +JEMALLOC_DIAGNOSTIC_POP + int main(void) { return test( |