Return to BSD News archive
Xref: sserve comp.lang.tcl:16262 comp.os.386bsd.bugs:2433 Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!ihnp4.ucsd.edu!qualcomm.com!qualcomm.com!not-for-mail From: bri@qualcomm.com (Brian Ellis) Newsgroups: comp.lang.tcl,comp.os.386bsd.bugs Subject: suggested bug fix / porting-issue in tcl Date: 22 Aug 1994 09:37:15 -0600 Organization: QUALCOMM, Incorporated; San Diego, CA, USA Lines: 39 Message-ID: <33agnb$ri7@qualcomm.com> NNTP-Posting-Host: redcloud.qualcomm.com After several hours of investigation, I've gotten tcl7.3 to pass the test suite under FreeBSD 1.1.5.1. I thought I'd share what happened. The stock tcl7.3 distribution failed the expr.test at expr-34.9. That test evaluates acos(-2.0), which is a floating point domain error. The expression generated a SIGFPE causing a core dump. I located the FreeBSD port of tcl7.3 and built that. It passed the test suite when invoked as "make test", but surprisingly it failed the same expr test when invoked as "echo source all | /usr/local/bin/tclsh". I was perplexed. I discovered that whoever "ported" tcl7.3 to FreeBSD modified tclTest.c which is only used when running the test suite. The following changes comprise the entire porting effort of tcl7.3 to FreeBSD (i.e. these were the changes to tclTest.c) and should probably be made part of the tcl distribution. The changes only effect the way that floating point exceptions are reported. I've choosen to move the changes out of tclTest.c and into tclBasic.c. in tclBasic.c at top-of-file: #ifdef BSD_NET2 #include <floatingpoint.h> #endif in tclBasic.c in Tcl_Init(): #ifdef BSD_NET2 fpsetround(FP_RN); fpsetmask(0L); #endif -brian ------------------------------------------------------------------------------ __ Brian Ellis |_ _ . | | _ | _ _ .__ .__ _ _ .__ (303)546-1521 |_) | | @ |_\| (_| (_| | (_ (_) ||| ||| . (_ (_) ||| (internal x1521) ------------------------------------------------------------------------------