Red Hat Bugzilla – Bug 1298483
tcsh recognize value 2147483648 in variable as negative because of internal 32bit limitation
Last modified: 2016-05-10 20:56:04 EDT
Description of problem:
tcsh recognize value 2147483648 in variable as negative.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Execute following test01.csh
====== script ====
echo $InPutFSize "is positive value";
echo $InPutFSize "is negative value";
====== script end ===
Result with tcsh from RHEL6. (tcsh-6.17-25.el6_6)
2147483648 is negative value
Result with tcsh from RHEL7 (tcsh-6.18.01-8.el7)
2147483648 is positive value
This symptom doesn't exist on tcsh from RHEL7.
After spending some times for bisect,
I found following commit between 6.17.00 and 6.17.01
fix the symptom.
Author: Christos Zoulas <firstname.lastname@example.org>
Date: Tue Jan 26 16:10:08 2010 +0000
make internal calculations use 64 bits.
Please consider backport this patch to tcsh on RHEL6.
and thank you for your bug report and the additional information you have provided to us. We really appreciate your contribution.
NOTE: Additional (follow-up) commit is necessary as well:
> commit 90a08c664d09f275eb1ecb538944164bd92d6168
> Author: Christos Zoulas <email@example.com>
> Date: 6 years ago
> deal with systems that don't have long long
Test tcsh RPM from RHEL6.8 alpha-1, it worked as expected!
[root@localhost ~]# cat test01.tcsh
echo $InPutFSize " is positive value";
echo $InPutFSize " is negative value";
[root@localhost ~]# ./test01.tcsh
2147483648 is positive value <==
[root@localhost ~]# rpm -q tcsh
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.