This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bugs in sysdeps/ia64/fpu/libm_error.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]