From owner-freebsd-bugs Thu Aug 23 5:20:12 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0C3A037B401 for ; Thu, 23 Aug 2001 05:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7NCK2759114; Thu, 23 Aug 2001 05:20:02 -0700 (PDT) (envelope-from gnats) Date: Thu, 23 Aug 2001 05:20:02 -0700 (PDT) Message-Id: <200108231220.f7NCK2759114@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: David Malone Subject: Re: misc/29987: error in libc (simultanous call to malloc or free and printf causes Segmentation Fault) Reply-To: David Malone Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/29987; it has been noted by GNATS. From: David Malone To: Jakub Kruszona-Zawadzki 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