Skip to content
Snippets Groups Projects
  • James E Wilson's avatar
    2483ad58
    Fix FreeBSD failure with recursive malloc call. · 2483ad58
    James E Wilson authored
    * mf-hooks1.c (malloc, calloc, realloc, free,
    __mf_wrap_alloca_indirect): Call BEGIN_MALLOC_PROTECT before calling
    the real routines, and END_MALLOC_PROTECT afterwards.
    * mf-impl.h (enum __mf_state_enum): Expand comment.  Add in_malloc.
    (BEGIN_PROTECT): Handle in_malloc state.
    (BEGIN_MALLOC_PROTECT, END_MALLOC_PROTECT): New.
    * testsuite/libmudflap.c/hook2-allocstuff.c: New.
    
    From-SVN: r103256
    2483ad58
    History
    Fix FreeBSD failure with recursive malloc call.
    James E Wilson authored
    * mf-hooks1.c (malloc, calloc, realloc, free,
    __mf_wrap_alloca_indirect): Call BEGIN_MALLOC_PROTECT before calling
    the real routines, and END_MALLOC_PROTECT afterwards.
    * mf-impl.h (enum __mf_state_enum): Expand comment.  Add in_malloc.
    (BEGIN_PROTECT): Handle in_malloc state.
    (BEGIN_MALLOC_PROTECT, END_MALLOC_PROTECT): New.
    * testsuite/libmudflap.c/hook2-allocstuff.c: New.
    
    From-SVN: r103256