Skip to content

Commit

Permalink
Hack to avoid crash when using as a preloaded library
Browse files Browse the repository at this point in the history
  • Loading branch information
sporksmith committed May 3, 2020
1 parent 6d66715 commit 575ea9f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions malloc/arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,14 @@ ptmalloc_init (void)
#ifdef SHARED
/* In case this libc copy is in a non-default namespace, never use brk.
Likewise if dlopened from statically linked program. */
/*
Dl_info di;
struct link_map *l;
if (_dl_open_hook != NULL
|| (_dl_addr (ptmalloc_init, &di, &l, NULL) != 0
&& l->l_ns != LM_ID_BASE))
*/
__morecore = __failing_morecore;
#endif

Expand Down

0 comments on commit 575ea9f

Please sign in to comment.