Fix tsd bootstrapping for a0malloc().
This commit is contained in:
19
test/unit/a0.c
Normal file
19
test/unit/a0.c
Normal 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));
|
||||
}
|
@@ -244,7 +244,6 @@ int
|
||||
main(void)
|
||||
{
|
||||
|
||||
assert(!config_fill || opt_junk_alloc || opt_junk_free);
|
||||
return (test(
|
||||
test_junk_small,
|
||||
test_junk_large,
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user