Date: Thu, 23 Aug 2001 05:20:02 -0700 (PDT) From: David Malone <dwmalone@maths.tcd.ie> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/29987: error in libc (simultanous call to malloc or free and printf causes Segmentation Fault) Message-ID: <200108231220.f7NCK2759114@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/29987; it has been noted by GNATS. From: David Malone <dwmalone@maths.tcd.ie> To: Jakub Kruszona-Zawadzki <acid@gem.pl> Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: misc/29987: error in libc (simultanous call to malloc or free and printf causes Segmentation Fault) Date: Thu, 23 Aug 2001 13:19:11 +0100 On Thu, Aug 23, 2001 at 01:49:29PM +0200, Jakub Kruszona-Zawadzki wrote: > same bug exists on different freebsd versions. We tested FreeBSD 4.1 > and FreeBSD 4.3. On both problem exists It is not legal to call printf or malloc from a signal handler. What you are alowd to do in a signal handler depends on if you are writing C according to ANSI, Posix, the Single Unix Specification or some other standard. The sigaction man page has a list of fucntions which you may call from a signal hangler - I think this list is roughly the list given in Posix. > (We tested it on Linux too - there is no such problem) It is more likely the problem was just not detected - FreeBSD's malloc actively tries to spot this problem. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108231220.f7NCK2759114>