From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 19 15:30:25 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5FAC16A4CE for ; Sun, 19 Dec 2004 15:30:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 931DB43D1F for ; Sun, 19 Dec 2004 15:30:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJFUPiQ079593 for ; Sun, 19 Dec 2004 15:30:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJFUPXC079591; Sun, 19 Dec 2004 15:30:25 GMT (envelope-from gnats) Date: Sun, 19 Dec 2004 15:30:25 GMT Message-Id: <200412191530.iBJFUPXC079591@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Oleg V. Nauman" Subject: Re: bin/75258: [patch] dd(1) has not async signal safe interrupt handlers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Oleg V. Nauman" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2004 15:30:25 -0000 The following reply was made to PR bin/75258; it has been noted by GNATS. From: "Oleg V. Nauman" To: Maxim Konovalov Cc: bug-followup@freebsd.org Subject: Re: bin/75258: [patch] dd(1) has not async signal safe interrupt handlers Date: Sun, 19 Dec 2004 17:29:59 +0200 --VrqPEDrXMn8OVzN4 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 19, 2004 at 06:11:06PM +0300, Maxim Konovalov wrote: > [...] > > >Description: > > dd(1) uses not safe interrupt handlers, they may leads to > > strange problems with dd >=20 > Are you sure? Do you have a testcase? No, sorry. >=20 > > >How-To-Repeat: > > > > man 2 sigaction >=20 > Well, stdio(3) is not signal-safe in general but it seems for me > summary() does not manipulate with the internal state of any file > descriptors (it uses write(2)) and should be safe. But s*printf() family uses malloc(3) for his internal purposes, and there is no any reasons for things like memory allocations in the signal handler, I think. >=20 > Browseing the commit history says the same. >=20 > [...] > > +int need_summary; >=20 > This should be volatile sig_atomic_to. Yes, you are right, thank you. >=20 > --=20 > Maxim Konovalov --=20 NO37-RIPE --VrqPEDrXMn8OVzN4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQCVAwUBQcWeZ/C2y8Tb/5DvAQFWZgP/YY9BfKFkTS1Tjp/9B5iEz85TJAHjslV1 UvK0TlY0LX/R7DWf3d9JUY9KB6NRscuIpoGz5aIH9X4SAZXwzAdUrGHupmOmF8DZ VxlBbPjM2f/saexVzKOw6MURaxZC3JAW5K4jLACSIPEQeSUTMcQJQqopnYQ7bBHK iWc2Iy/FtfY= =WXGA -----END PGP SIGNATURE----- --VrqPEDrXMn8OVzN4--