From owner-freebsd-bugs Fri Dec 8 01:15:09 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id BAA13338 for bugs-outgoing; Fri, 8 Dec 1995 01:15:09 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [192.216.222.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id BAA13326 for ; Fri, 8 Dec 1995 01:15:02 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id BAA16689 for ; Fri, 8 Dec 1995 01:09:29 -0800 Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id KAA00657; Fri, 8 Dec 1995 10:07:45 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id KAA07629; Fri, 8 Dec 1995 10:07:45 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.6.12/8.6.9) id KAA22615; Fri, 8 Dec 1995 10:00:47 +0100 From: J Wunsch Message-Id: <199512080900.KAA22615@uriah.heep.sax.de> Subject: Re: uucp 1.06.1 bug To: am@f1.ru Date: Fri, 8 Dec 1995 10:00:47 +0100 (MET) Cc: freebsd-bugs@freebsd.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199512072245.BAA26678@px.f1.ru> from "Andrew Maltsev" at Dec 8, 95 01:45:55 am X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-bugs@freebsd.org Precedence: bulk As Andrew Maltsev wrote: > > The Ian Tailor's uucp 1.06.1 (and, possible, earlier versions) often > dies with "Floating exception" under FreeBSD 2.1R when compiled with > HAVE_SELECT defined. Especially when using uucp over TCP/IP. > > The problem is around line 2776 at libunix/serial.c ...and a couple of more places. Here's the patch i'm using to work around the SIGFPE: --- libunix/serial.c~ Mon Aug 28 12:33:21 1995 +++ libunix/serial.c Sat Oct 7 20:21:33 1995 @@ -2371,7 +2371,7 @@ else csleepchars = MAX_INPUT - 10; - isleep = (int) (((long) csleepchars * 10000L) / q->ibaud); + isleep = (int) (((long) csleepchars * 10000L) / (q->ibaud? q->ibaud: (long)1200)); isleep -= 10; if (isleep > 10) @@ -2773,8 +2773,8 @@ / baud bits/sec) * 10 bits/byte) */ - stime.tv_sec = (long) 10240 / q->ibaud; - stime.tv_usec = ((((long) 1024000000 / q->ibaud) * (long) 10) + stime.tv_sec = (long) 10240 / (q->ibaud? q->ibaud: (long)1200); + stime.tv_usec = ((((long) 1024000000 / (q->ibaud? q->ibaud: (long)1200)) * (long) 10) % (long) 1000000); imask = 1 << q->o; @@ -2846,7 +2846,7 @@ we don't need to use the catch stuff, since we know that HAVE_RESTARTABLE_SYSCALLS is 0. */ usset_signal (SIGALRM, usalarm, TRUE, (boolean *) NULL); - alarm ((int) ((long) 10240 / q->ibaud) + 1); + alarm ((int) ((long) 10240 / (q->ibaud? q->ibaud: (long)1200)) + 1); /* There is a race condition here: on a severely loaded system, we could get the alarm before we start the The problem is known to Ian Taylor and Andrey Chernov, and i still believe the entire Baud rate logic is bogus (since today's modems tend to run with DTE speeds much higher than the line speeds anyway). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)