Date: Sun, 19 Dec 2004 15:30:25 GMT From: "Oleg V. Nauman" <oleg@reis.zp.ua> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/75258: [patch] dd(1) has not async signal safe interrupt handlers Message-ID: <200412191530.iBJFUPXC079591@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/75258; it has been noted by GNATS. From: "Oleg V. Nauman" <oleg@reis.zp.ua> To: Maxim Konovalov <maxim@macomnet.ru> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412191530.iBJFUPXC079591>