From a70d6615095563c5ab76d6c682adaa6258254bc14eafd8fe0289faa41f1dfb0b Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 19 Feb 2010 18:50:20 +0000 Subject: [PATCH 1/3] Prevent floating point assist fault on IA64 OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=33 --- ready | 0 tcl-SafeLdExp.patch | 35 +++++++++++++++++++++++++++++++++++ tcl.changes | 6 ++++++ tcl.spec | 2 ++ 4 files changed, 43 insertions(+) delete mode 100644 ready create mode 100644 tcl-SafeLdExp.patch diff --git a/ready b/ready deleted file mode 100644 index 473a0f4..0000000 diff --git a/tcl-SafeLdExp.patch b/tcl-SafeLdExp.patch new file mode 100644 index 0000000..0248142 --- /dev/null +++ b/tcl-SafeLdExp.patch @@ -0,0 +1,35 @@ +? NSK1200002852A +Index: generic/tclStrToD.c +=================================================================== +RCS file: /cvsroot/tcl/tcl/generic/tclStrToD.c,v +retrieving revision 1.39 +diff -u -r1.39 tclStrToD.c +--- generic/tclStrToD.c 7 Dec 2009 17:15:33 -0000 1.39 ++++ generic/tclStrToD.c 19 Feb 2010 02:42:35 -0000 +@@ -110,7 +110,6 @@ + static int mantBits; /* Number of bits in a double's significand */ + static mp_int pow5[9]; /* Table of powers of 5**(2**n), up to + * 5**256 */ +-static double tiny; /* The smallest representable double */ + static int maxDigits; /* The maximum number of digits to the left of + * the decimal point of a double. */ + static int minDigits; /* The maximum number of digits to the right +@@ -1490,8 +1489,8 @@ + goto returnValue; + } + retval = SafeLdExp(retval, machexp); +- if (retval < tiny) { +- retval = tiny; ++ if (retval == 0.0) { ++ retval = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); + } + + /* +@@ -2245,7 +2244,6 @@ + * the significand of a double. + */ + +- tiny = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); + maxDigits = (int) ((DBL_MAX_EXP * log((double) FLT_RADIX) + + 0.5 * log(10.)) / log(10.)); + minDigits = (int) floor((DBL_MIN_EXP - DBL_MANT_DIG) diff --git a/tcl.changes b/tcl.changes index a30c856..48f2108 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 19 19:36:17 CET 2010 - max@suse.de + +- Add tcl-SafeLdExp.patch to prevent a floating point assist fault + during startup on IA64 (bnc#578068). + ------------------------------------------------------------------- Thu Jan 21 12:55:33 CET 2010 - rguenther@suse.de diff --git a/tcl.spec b/tcl.spec index e92e755..f5b2430 100644 --- a/tcl.spec +++ b/tcl.spec @@ -42,6 +42,7 @@ Source3: macros.tcl Patch0: tcl.patch Patch1: tcl-unload.patch Patch2: tcl-fortify.patch +Patch3: tcl-SafeLdExp.patch %description Tcl (Tool Command Language) is a very powerful but easy to learn @@ -90,6 +91,7 @@ Authors: %patch0 %patch1 %patch2 +%patch3 %build cd unix From 60359f83e9a6627f89eae7598ec87558ff0d8108de36dccb178664acbdddf56c Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 18 Mar 2010 21:48:35 +0000 Subject: [PATCH 2/3] Accepting request 35163 from devel:languages:tcl checked in (request 35163) OBS-URL: https://build.opensuse.org/request/show/35163 OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=34 --- tcl-SafeLdExp.patch | 35 ----------------------------------- tcl.changes | 6 ------ tcl.spec | 2 -- 3 files changed, 43 deletions(-) delete mode 100644 tcl-SafeLdExp.patch diff --git a/tcl-SafeLdExp.patch b/tcl-SafeLdExp.patch deleted file mode 100644 index 0248142..0000000 --- a/tcl-SafeLdExp.patch +++ /dev/null @@ -1,35 +0,0 @@ -? NSK1200002852A -Index: generic/tclStrToD.c -=================================================================== -RCS file: /cvsroot/tcl/tcl/generic/tclStrToD.c,v -retrieving revision 1.39 -diff -u -r1.39 tclStrToD.c ---- generic/tclStrToD.c 7 Dec 2009 17:15:33 -0000 1.39 -+++ generic/tclStrToD.c 19 Feb 2010 02:42:35 -0000 -@@ -110,7 +110,6 @@ - static int mantBits; /* Number of bits in a double's significand */ - static mp_int pow5[9]; /* Table of powers of 5**(2**n), up to - * 5**256 */ --static double tiny; /* The smallest representable double */ - static int maxDigits; /* The maximum number of digits to the left of - * the decimal point of a double. */ - static int minDigits; /* The maximum number of digits to the right -@@ -1490,8 +1489,8 @@ - goto returnValue; - } - retval = SafeLdExp(retval, machexp); -- if (retval < tiny) { -- retval = tiny; -+ if (retval == 0.0) { -+ retval = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); - } - - /* -@@ -2245,7 +2244,6 @@ - * the significand of a double. - */ - -- tiny = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); - maxDigits = (int) ((DBL_MAX_EXP * log((double) FLT_RADIX) - + 0.5 * log(10.)) / log(10.)); - minDigits = (int) floor((DBL_MIN_EXP - DBL_MANT_DIG) diff --git a/tcl.changes b/tcl.changes index 48f2108..a30c856 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Fri Feb 19 19:36:17 CET 2010 - max@suse.de - -- Add tcl-SafeLdExp.patch to prevent a floating point assist fault - during startup on IA64 (bnc#578068). - ------------------------------------------------------------------- Thu Jan 21 12:55:33 CET 2010 - rguenther@suse.de diff --git a/tcl.spec b/tcl.spec index f5b2430..e92e755 100644 --- a/tcl.spec +++ b/tcl.spec @@ -42,7 +42,6 @@ Source3: macros.tcl Patch0: tcl.patch Patch1: tcl-unload.patch Patch2: tcl-fortify.patch -Patch3: tcl-SafeLdExp.patch %description Tcl (Tool Command Language) is a very powerful but easy to learn @@ -91,7 +90,6 @@ Authors: %patch0 %patch1 %patch2 -%patch3 %build cd unix From c9214d8576c61445d8cca2bb10ef0dbe35b9171562ffce32eab3e75f95cee8f8 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 18 Mar 2010 21:48:36 +0000 Subject: [PATCH 3/3] Updating link to change in openSUSE:Factory/tcl revision 21.0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=7ad2c605695c888ce4389f6ef1b98adb --- tcl-SafeLdExp.patch | 35 +++++++++++++++++++++++++++++++++++ tcl.changes | 6 ++++++ tcl.spec | 4 +++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tcl-SafeLdExp.patch diff --git a/tcl-SafeLdExp.patch b/tcl-SafeLdExp.patch new file mode 100644 index 0000000..0248142 --- /dev/null +++ b/tcl-SafeLdExp.patch @@ -0,0 +1,35 @@ +? NSK1200002852A +Index: generic/tclStrToD.c +=================================================================== +RCS file: /cvsroot/tcl/tcl/generic/tclStrToD.c,v +retrieving revision 1.39 +diff -u -r1.39 tclStrToD.c +--- generic/tclStrToD.c 7 Dec 2009 17:15:33 -0000 1.39 ++++ generic/tclStrToD.c 19 Feb 2010 02:42:35 -0000 +@@ -110,7 +110,6 @@ + static int mantBits; /* Number of bits in a double's significand */ + static mp_int pow5[9]; /* Table of powers of 5**(2**n), up to + * 5**256 */ +-static double tiny; /* The smallest representable double */ + static int maxDigits; /* The maximum number of digits to the left of + * the decimal point of a double. */ + static int minDigits; /* The maximum number of digits to the right +@@ -1490,8 +1489,8 @@ + goto returnValue; + } + retval = SafeLdExp(retval, machexp); +- if (retval < tiny) { +- retval = tiny; ++ if (retval == 0.0) { ++ retval = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); + } + + /* +@@ -2245,7 +2244,6 @@ + * the significand of a double. + */ + +- tiny = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); + maxDigits = (int) ((DBL_MAX_EXP * log((double) FLT_RADIX) + + 0.5 * log(10.)) / log(10.)); + minDigits = (int) floor((DBL_MIN_EXP - DBL_MANT_DIG) diff --git a/tcl.changes b/tcl.changes index a30c856..48f2108 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 19 19:36:17 CET 2010 - max@suse.de + +- Add tcl-SafeLdExp.patch to prevent a floating point assist fault + during startup on IA64 (bnc#578068). + ------------------------------------------------------------------- Thu Jan 21 12:55:33 CET 2010 - rguenther@suse.de diff --git a/tcl.spec b/tcl.spec index e92e755..7ef8d19 100644 --- a/tcl.spec +++ b/tcl.spec @@ -21,7 +21,7 @@ Name: tcl Url: http://www.tcl.tk Version: 8.5.8 -Release: 2 +Release: 3 %define TCL_MINOR %(echo %version | cut -c1-3) BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: The Tcl Programming Language @@ -42,6 +42,7 @@ Source3: macros.tcl Patch0: tcl.patch Patch1: tcl-unload.patch Patch2: tcl-fortify.patch +Patch3: tcl-SafeLdExp.patch %description Tcl (Tool Command Language) is a very powerful but easy to learn @@ -90,6 +91,7 @@ Authors: %patch0 %patch1 %patch2 +%patch3 %build cd unix