From c058cad4db2855848a342bb9ec4fc7e8117d408f Mon Sep 17 00:00:00 2001 From: law Date: Mon, 19 Oct 1998 10:44:52 +0000 Subject: * libgcc2.c (eh_context_static): Do not call malloc to allocate the static eh_context structure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23175 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/libgcc2.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gcc/libgcc2.c') diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index d519f238dda..21b72af0db6 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -3178,10 +3178,15 @@ eh_context_initialize () static struct eh_context * eh_context_static () { - static struct eh_context *eh; - if (! eh) - eh = new_eh_context (); - return eh; + static struct eh_context eh; + static int initialized; + if (! initialized) + { + initialized = 1; + memset (&eh, 0, sizeof eh); + eh.dynamic_handler_chain = top_elt; + } + return &eh; } #if __GTHREADS -- cgit v1.2.1