Skip to content

Commit 575ea9f

Browse files
committed
Hack to avoid crash when using as a preloaded library
1 parent 6d66715 commit 575ea9f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

malloc/arena.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,14 @@ ptmalloc_init (void)
296296
#ifdef SHARED
297297
/* In case this libc copy is in a non-default namespace, never use brk.
298298
Likewise if dlopened from statically linked program. */
299+
/*
299300
Dl_info di;
300301
struct link_map *l;
301302
302303
if (_dl_open_hook != NULL
303304
|| (_dl_addr (ptmalloc_init, &di, &l, NULL) != 0
304305
&& l->l_ns != LM_ID_BASE))
306+
*/
305307
__morecore = __failing_morecore;
306308
#endif
307309

0 commit comments

Comments
 (0)