Fix tsd bootstrapping for a0malloc().

This commit is contained in:
Jason Evans
2016-05-07 12:42:31 -07:00
parent 919e4a0ea9
commit 0c12dcabc5
7 changed files with 101 additions and 43 deletions

19
test/unit/a0.c Normal file
View File

@@ -0,0 +1,19 @@
#include "test/jemalloc_test.h"
TEST_BEGIN(test_a0)
{
void *p;
p = a0malloc(1);
assert_ptr_not_null(p, "Unexpected a0malloc() error");
a0dalloc(p);
}
TEST_END
int
main(void)
{
return (test_no_malloc_init(
test_a0));
}

View File

@@ -244,7 +244,6 @@ int
main(void)
{
assert(!config_fill || opt_junk_alloc || opt_junk_free);
return (test(
test_junk_small,
test_junk_large,

View File

@@ -99,6 +99,11 @@ int
main(void)
{
/* Core tsd bootstrapping must happen prior to data_tsd_boot(). */
if (nallocx(1, 0) == 0) {
malloc_printf("Initialization error");
return (test_status_fail);
}
data_tsd_boot();
return (test(