Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Sep 1998 23:22:55 +0000
From:      Niall Smart <rotel@indigo.ie>
To:        HighWind Software Information <info@highwind.com>, freebsd-current@FreeBSD.ORG
Cc:        jb@cimlogic.com.au
Subject:   Re: Thread Problems
Message-ID:  <199809082222.XAA01156@indigo.ie>
In-Reply-To: <199809080021.UAA04192@highwind.com>; HighWind Software Information <info@highwind.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 7,  8:21pm, HighWind Software Information wrote:
} Subject: Re: Thread Problems
> 
> Seems to me that libc_r can call free() from within a signal handler.
> Given the non-recursive nature of this call, this is a serious
> problem:

Yeah, it does look like this, I don't think this is OK.

Perhaps you could wrap _thread_kern_sched with

#define free(x) do { if (scp == NULL) free(x); } while(0)

#undef free

and see if this improves things any.

Niall

-- 
Niall Smart, rotel@indigo.ie.
Amaze your friends and annoy your enemies:
echo '#define if(x) if (!(x))' >> /usr/include/stdio.h

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809082222.XAA01156>