Skip to content

Commit ec4549d

Browse files
authored
Temporarily disable the use of __heap_base. (#132)
This temporarily disables the feature in a214f1c, since it hits LLVM bug 43613, which is fixed on LLVM master and awaiting a backport to the 9.0 branch. https://bugs.llvm.org/show_bug.cgi?id=43613
1 parent a214f1c commit ec4549d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

dlmalloc/src/malloc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4560,10 +4560,12 @@ static void* tmalloc_small(mstate m, size_t nb) {
45604560

45614561
#if !ONLY_MSPACES
45624562

4563+
#if 0 // Temporarily work around https://bugs.llvm.org/show_bug.cgi?id=43613
45634564
#if __wasilibc_unmodified_upstream // Forward declaration of try_init_allocator.
45644565
#else
45654566
static void try_init_allocator(void);
45664567
#endif
4568+
#endif
45674569

45684570
void* dlmalloc(size_t bytes) {
45694571
/*
@@ -4593,11 +4595,13 @@ void* dlmalloc(size_t bytes) {
45934595
ensure_initialization(); /* initialize in sys_alloc if not using locks */
45944596
#endif
45954597

4598+
#if 0 // Temporarily work around https://bugs.llvm.org/show_bug.cgi?id=43613
45964599
#if __wasilibc_unmodified_upstream // Try to initialize the allocator.
45974600
#else
45984601
if (!is_initialized(gm)) {
45994602
try_init_allocator();
46004603
}
4604+
#endif
46014605
#endif
46024606

46034607
if (!PREACTION(gm)) {
@@ -5209,6 +5213,7 @@ static void internal_inspect_all(mstate m,
52095213
}
52105214
#endif /* MALLOC_INSPECT_ALL */
52115215

5216+
#if 0 // Temporarily work around https://bugs.llvm.org/show_bug.cgi?id=43613
52125217
#ifdef __wasilibc_unmodified_upstream // Define a function that initializes the initial state of dlmalloc
52135218
#else
52145219
/* ------------------ Exported try_init_allocator -------------------- */
@@ -5244,6 +5249,7 @@ static void try_init_allocator(void) {
52445249
init_top(gm, (mchunkptr)base, initial_heap_size - TOP_FOOT_SIZE);
52455250
}
52465251
#endif
5252+
#endif
52475253

52485254
/* ------------------ Exported realloc, memalign, etc -------------------- */
52495255

expected/wasm32-wasi/undefined-symbols.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ __floatsitf
1010
__floatunsitf
1111
__getf2
1212
__gttf2
13-
__heap_base
1413
__letf2
1514
__lttf2
1615
__netf2

0 commit comments

Comments
 (0)