diff options
author | Jason Evans <je@fb.com> | 2014-01-29 18:54:18 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2014-01-29 18:58:32 (GMT) |
commit | 2850e90d0d42d0e2b54864949bfa41c59c3a8dc9 (patch) | |
tree | 330e1b322dc93adf92fd2480b83bb23ac9d42a45 | |
parent | 5f60afa01eb2cf7d44024d162a1ecc6cceedcca1 (diff) | |
download | jemalloc-2850e90d0d42d0e2b54864949bfa41c59c3a8dc9.zip jemalloc-2850e90d0d42d0e2b54864949bfa41c59c3a8dc9.tar.gz jemalloc-2850e90d0d42d0e2b54864949bfa41c59c3a8dc9.tar.bz2 |
Remove flawed alignment-related overflow test.
Remove the allocm() test equivalent to the mallocx() test removed in the
previous commit. The flawed test attempted to cause OOM due to large
request size and alignment constraint. Although this test "passed" on
64-bit systems due to the virtual memory hole, it could pass on some
32-bit systems.
-rw-r--r-- | test/integration/allocm.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/test/integration/allocm.c b/test/integration/allocm.c index bd7a3ca..66ecf86 100644 --- a/test/integration/allocm.c +++ b/test/integration/allocm.c @@ -39,28 +39,6 @@ TEST_BEGIN(test_basic) } TEST_END -TEST_BEGIN(test_alignment_errors) -{ - void *p; - size_t nsz, rsz, sz, alignment; - -#if LG_SIZEOF_PTR == 3 - alignment = UINT64_C(0x4000000000000000); - sz = UINT64_C(0x8400000000000001); -#else - alignment = 0x40000000LU; - sz = 0x84000001LU; -#endif - nsz = 0; - assert_d_eq(nallocm(&nsz, sz, ALLOCM_ALIGN(alignment)), ALLOCM_SUCCESS, - "Unexpected nallocm() error"); - rsz = 0; - assert_d_ne(allocm(&p, &rsz, sz, ALLOCM_ALIGN(alignment)), - ALLOCM_SUCCESS, "Expected error for allocm(&p, %zu, %#x)", - sz, ALLOCM_ALIGN(alignment)); -} -TEST_END - TEST_BEGIN(test_alignment_and_size) { int r; @@ -126,6 +104,5 @@ main(void) return (test( test_basic, - test_alignment_errors, test_alignment_and_size)); } |