* Bugs in sysdeps/ia64/fpu/libm_error.c
@ 2005-08-14 19:19 Jakub Jelinek
2005-08-19 23:44 ` H. J. Lu
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2005-08-14 19:19 UTC (permalink / raw)
To: hongjiu.lu; +Cc: Glibc hackers
Hi!
sysdeps/ia64/fpu/libm_error.c has 3 huge switches that handle various
conditions. For
else if(_LIB_VERSIONIMF==_ISOC_)
and
else if(_LIB_VERSIONIMF==_POSIX_)
it has an abort () in default: case, while in
/* __SVID__ and __XOPEN__ Path */
switch it does not and has a comment that it doesn't indeed cover all
the cases.
Now, looking just at the differences between the first 2 switches,
values handled by _ISOC_ switch but not _POSIX_ switch are:
erfc_underflow
erfcf_underflow
erfcl_underflow
fdim_overflow
fdimf_overflow
fdiml_overflow
llrint_large
llrintf_large
llrintl_large
llround_large
llroundf_large
llroundl_large
lrint_large
lrintf_large
lrintl_large
lround_large
lroundf_large
lroundl_large
(and https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=165693
demonstrates abort() caused by this when e.g. erfc (30) is called).
Values handled just in the _POSIX_ switch but not in _ISOC_ switch are:
expm1_underflow
expm1f_underflow
expm1l_underflow
j0_gt_loss
j0f_gt_loss
j0l_gt_loss
j1_gt_loss
j1f_gt_loss
j1l_gt_loss
jn_gt_loss
jnf_gt_loss
jnl_gt_loss
pow_nan_to_zero
pow_zero_to_zero
powf_nan_to_zero
powf_zero_to_zero
powl_nan_to_zero
powl_zero_to_zero
remainder_by_zero
remainderf_by_zero
remainderl_by_zero
y0_gt_loss
y0f_gt_loss
y0l_gt_loss
y1_gt_loss
y1f_gt_loss
y1l_gt_loss
yn_gt_loss
ynf_gt_loss
ynl_gt_loss
Neither of the switches covers:
gamma_reserve
gammaf_reserve
gammal_reserve
lgamma_reserve
lgammaf_reserve
lgammal_reserve
remquo_by_zero
remquof_by_zero
remquol_by_zero
tgamma_reserve
tgammaf_reserve
tgammal_reserve
From quick grepping, I see mov GR_Parameter_TAG = XXX instructions covering
from the _ISOC_ handled but not _POSIX_ group:
erfc_underflow
erfcf_underflow
erfcl_underflow
fdim_overflow
fdimf_overflow
fdiml_overflow
and from the _POSIX_ but not _ISOC_ group:
powl_nan_to_zero
powl_zero_to_zero
remainder_by_zero
remainderf_by_zero
remainderl_by_zero
(and none from the defined in libm_error_codes.h but not handled in either
switches). So I guess at least the above 6 + 5 cases certainly need to be
handled.
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bugs in sysdeps/ia64/fpu/libm_error.c
2005-08-14 19:19 Bugs in sysdeps/ia64/fpu/libm_error.c Jakub Jelinek
@ 2005-08-19 23:44 ` H. J. Lu
2005-08-20 1:22 ` Ulrich Drepper
0 siblings, 1 reply; 3+ messages in thread
From: H. J. Lu @ 2005-08-19 23:44 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Glibc hackers
On Sun, Aug 14, 2005 at 09:19:34PM +0200, Jakub Jelinek wrote:
> Hi!
>
> sysdeps/ia64/fpu/libm_error.c has 3 huge switches that handle various
> conditions. For
> else if(_LIB_VERSIONIMF==_ISOC_)
> and
> else if(_LIB_VERSIONIMF==_POSIX_)
> it has an abort () in default: case, while in
> /* __SVID__ and __XOPEN__ Path */
> switch it does not and has a comment that it doesn't indeed cover all
> the cases.
> Now, looking just at the differences between the first 2 switches,
> values handled by _ISOC_ switch but not _POSIX_ switch are:
I talked to Intel libm people. They suggested removing abort.
H.J.
----
2005-08-19 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/ia64/fpu/libm_error.c (__libm_error_support): Don't
abort.
--- sysdeps/ia64/fpu/libm_error.c.abort 2005-04-08 10:24:55.000000000 -0700
+++ sysdeps/ia64/fpu/libm_error.c 2005-08-19 16:37:10.434656746 -0700
@@ -674,7 +674,7 @@ else if(_LIB_VERSIONIMF==_ISOC_)
ERRNO_DOMAIN; break;
}
default:
- abort();
+ break;
}
return;
}
@@ -1374,7 +1374,7 @@ switch(input_tag)
ERRNO_RANGE; break;
}
default:
- abort();
+ break;
}
return;
/* _POSIX_ */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bugs in sysdeps/ia64/fpu/libm_error.c
2005-08-19 23:44 ` H. J. Lu
@ 2005-08-20 1:22 ` Ulrich Drepper
0 siblings, 0 replies; 3+ messages in thread
From: Ulrich Drepper @ 2005-08-20 1:22 UTC (permalink / raw)
To: H. J. Lu; +Cc: Jakub Jelinek, Glibc hackers
[-- Attachment #1: Type: text/plain, Size: 112 bytes --]
I made that change.
--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-20 1:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-14 19:19 Bugs in sysdeps/ia64/fpu/libm_error.c Jakub Jelinek
2005-08-19 23:44 ` H. J. Lu
2005-08-20 1:22 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).