OSDN Git Service

Fix FreeBSD failure with recursive malloc call.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Aug 2005 20:01:54 +0000 (20:01 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Aug 2005 20:01:54 +0000 (20:01 +0000)
commita3fb7997a5beae9ce90f682c7788faedc7b8bbac
treee892f1756c7f014246b880abc4d6a071e49ab659
parent6be9086512533e232a11658b5b430f56474a3933
Fix FreeBSD failure with recursive malloc call.
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103256 138bc75d-0d04-0410-961f-82ee72b054a4
libmudflap/ChangeLog
libmudflap/mf-hooks1.c
libmudflap/mf-impl.h
libmudflap/testsuite/libmudflap.c/hook2-allocstuff.c [new file with mode: 0644]