Tcl Source Code

View Ticket
Login
Ticket UUID: 2952904
Title: "floating point assist fault" on IA64 during Tcl startup
Type: Bug Version: None
Submitter: rmax Created on: 2010-02-16 17:35:29
Subsystem: 48. Number Handling Assigned To: rmax
Priority: 1 Zero Severity:
Status: Open Last Modified: 2010-05-19 18:51:05
Resolution: None Closed By:
    Closed on:
Description:
The line

tiny = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits);

from TclInitDoubleConversion() causes a "floating-point assist fault" to be written to the system log on Linux/IA64.
User Comments: nijtmans added on 2010-05-19 18:51:05:
Or, just apply the corrected fix 2952904_2.patch
to the 8.5 branch.

nijtmans added on 2010-05-19 18:49:55:

File Added - 374432: 2952904_2.patch

nijtmans added on 2010-05-19 18:42:19:
This fix caused [Bug #2996549] in HEAD, so
whenever this fix is backported to the 8.5
branch, at least #2996549 should be
backported along with it.

kennykb added on 2010-02-19 09:58:07:
IMO a regression test is difficult to develop because the SWFPA behaviour is not observable directly to the process; the only way to detect the problem is for a root process to examine the syslog output (which can be disabled in any case) on an IA64 machine. I don't have suitable hardware available to develop the test, so I'm assigning to rmax. The patch should not be committed without an appropriate test case.

kennykb added on 2010-02-19 09:52:43:

File Added - 363529: 2952904.patch

kennykb added on 2010-02-19 09:52:14:
The attached patch does the following things:

It removes the constant 'tiny' which holds the smallest floating point number that is still greater than zero. It replaces a comparison 'retval < tiny' with 'retval <= 0.0', which is logically equivalent. It replaces an assignment from the 'tiny' constant with fabricating the number when the assignment takes place - note that this will cause floating point software assist only when the eventual return value will be a denormal. And it removes the run-time initialization of 'tiny'. This should avoid the spurious log message at initialization time, and cause log messages to appear only when denormals are produced.

Attachments: