diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
commit | aff03b0a67c41cf7af5df9c9eef715a8b27a2667 (patch) | |
tree | aa2909ae4718f81c83c8cfb68c1f5a23485b3173 /memory/jemalloc/src/test/integration/overflow.c | |
parent | bdb4ff581677ad1cd411b55a68c87534f9a64882 (diff) | |
parent | 11caf6ecb3cb8c84d2355a6c6e9580a290147e92 (diff) | |
download | UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.gz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.lz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.xz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into js_dom_performance-resource-timing_1
Diffstat (limited to 'memory/jemalloc/src/test/integration/overflow.c')
-rw-r--r-- | memory/jemalloc/src/test/integration/overflow.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/memory/jemalloc/src/test/integration/overflow.c b/memory/jemalloc/src/test/integration/overflow.c deleted file mode 100644 index 303d9b2d3..000000000 --- a/memory/jemalloc/src/test/integration/overflow.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "test/jemalloc_test.h" - -TEST_BEGIN(test_overflow) -{ - unsigned nhchunks; - size_t mib[4]; - size_t sz, miblen, max_size_class; - void *p; - - sz = sizeof(unsigned); - assert_d_eq(mallctl("arenas.nhchunks", &nhchunks, &sz, NULL, 0), 0, - "Unexpected mallctl() error"); - - miblen = sizeof(mib) / sizeof(size_t); - assert_d_eq(mallctlnametomib("arenas.hchunk.0.size", mib, &miblen), 0, - "Unexpected mallctlnametomib() error"); - mib[2] = nhchunks - 1; - - sz = sizeof(size_t); - assert_d_eq(mallctlbymib(mib, miblen, &max_size_class, &sz, NULL, 0), 0, - "Unexpected mallctlbymib() error"); - - assert_ptr_null(malloc(max_size_class + 1), - "Expected OOM due to over-sized allocation request"); - assert_ptr_null(malloc(SIZE_T_MAX), - "Expected OOM due to over-sized allocation request"); - - assert_ptr_null(calloc(1, max_size_class + 1), - "Expected OOM due to over-sized allocation request"); - assert_ptr_null(calloc(1, SIZE_T_MAX), - "Expected OOM due to over-sized allocation request"); - - p = malloc(1); - assert_ptr_not_null(p, "Unexpected malloc() OOM"); - assert_ptr_null(realloc(p, max_size_class + 1), - "Expected OOM due to over-sized allocation request"); - assert_ptr_null(realloc(p, SIZE_T_MAX), - "Expected OOM due to over-sized allocation request"); - free(p); -} -TEST_END - -int -main(void) -{ - - return (test( - test_overflow)); -} |