mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 01:27:19 +03:00
Fix/remove flawed alignment-related overflow tests.
Fix/remove three related flawed tests that attempted to cause OOM due to large request size and alignment constraint. Although these tests "passed" on 64-bit systems due to the virtual memory hole, they could pass on some 32-bit systems.
This commit is contained in:
parent
2b51a3e9e9
commit
a184d3fcde
3 changed files with 4 additions and 25 deletions
|
|
@ -43,10 +43,10 @@ TEST_BEGIN(test_oom_errors)
|
|||
|
||||
#if LG_SIZEOF_PTR == 3
|
||||
alignment = UINT64_C(0x4000000000000000);
|
||||
size = UINT64_C(0x8400000000000001);
|
||||
size = UINT64_C(0xc000000000000001);
|
||||
#else
|
||||
alignment = 0x40000000LU;
|
||||
size = 0x84000001LU;
|
||||
size = 0xc0000001LU;
|
||||
#endif
|
||||
assert_d_ne(posix_memalign(&p, alignment, size), 0,
|
||||
"Expected error for posix_memalign(&p, %zu, %zu)",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue