Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-08-28
19:35 • Ticket [748952ffff] get.test failed status still Open with 4 other changes artifact: 390717f255 user: dkf
2005-06-28
22:11 • Ticket [748952ffff]: 4 changes artifact: 0dc52536cc user: dgp
2004-05-20
16:25 • Ticket [748952ffff]: 4 changes artifact: 7820526c3b user: dkf
2004-05-19
17:39 • Ticket [748952ffff]: 4 changes artifact: b14cbb67ee user: mmokrejs
16:49 • Ticket [748952ffff]: 4 changes artifact: eb3e06b48d user: dkf
16:10 • Ticket [748952ffff]: 4 changes artifact: fbcba62289 user: mmokrejs
2003-12-03
21:32 • Ticket [748952ffff]: 4 changes artifact: ac65b044e0 user: dkf
21:02 • Ticket [748952ffff]: 4 changes artifact: 8aeef1f97a user: mmokrejs
2003-07-29
17:42 • Ticket [748952ffff]: 4 changes artifact: 446f501e86 user: mmokrejs
16:53 • Ticket [748952ffff]: 4 changes artifact: 20119be82f user: mmokrejs
2003-07-23
17:54 • Ticket [748952ffff]: 6 changes artifact: 4ce775d273 user: dkf
2003-07-18
18:41 • Ticket [748952ffff]: 4 changes artifact: 88832e486c user: mmokrejs
2003-07-17
17:47 • Ticket [748952ffff]: 4 changes artifact: d90430c144 user: dkf
05:19 • Ticket [748952ffff]: 5 changes artifact: 66e5f425e1 user: hobbs
2003-06-04
23:05 • Ticket [748952ffff]: 2 changes artifact: aa5f777fbf user: dgp
15:57 • New ticket [748952ffff]. artifact: a35d191f3c user: mmokrejs

get.test failed

Open748952ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 21 years ago
Descriptionplain2003-06-04 15:57:07
Hi,
I have compiled tcl8.4.3 on Tru64Unix (formerly OSF1)
and make test fails in many cases. Would someone
inspect the output? Thanks!

I used cc/cxx from vendor, latest version, C*FLAGS"-O2
-arch ev56" if that matters.


The original bugreport is at
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=748804&group_id=10894

==== get-1.10 Tcl_GetInt procedure FAILED
==== Contents of test case:

set x 0
list [catch {incr x -18446744073709551614} msg] $msg
    
---- Result was:
1 {integer value too large to represent}
---- Result should have been (exact matching):
0 2
==== get-1.10 FAILED
dgp Ticket [748952ffff]: 2 changes [History diff]2003-06-04 23:05:04
hobbsplain2003-07-17 05:19:19
Logged In: YES 
user_id=72656

somehow tru64 isn't getting the right 64-bit wide int stuff.
dkfplain2003-07-17 17:47:33
Logged In: YES 
user_id=79902

Bizarre, especially as it seems that get-1.8, 1.9 and 1.11 are 
working.  :^(  It feels like this might just be an annoying error 
on the part of Tru64's libc...  :^( :^(
mmokrejsplain2003-07-18 18:41:24
Logged In: YES 
user_id=696559

The current cvs checjkout of cvs says:

checking if 64bit support is requested... yes
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... OSF1-V5.1
checking for dlopen in -ldl... no
checking for ar... ar
configure: WARNING: "64bit support being disabled -- don\'t
know magic for this platform"
dkfplain2003-07-23 17:54:12
Logged In: YES 
user_id=79902

Don't specify --enable-64bit to configure on Tru64 as it is
*always* enabled since the C compiler makes 'long' a 64-bit
type on that platform by default.  The configure flag is
needed on a number of other architectures where 32/64 is a
real compile-time choice.  (OTOH, it'd be nice if configure
was updated to silently ignore the flag on Tru64 instead of
moaning about it, but that's separate to this bug.)

It looks to me exactly like the Tru64 strtol() impl. has
been implemented in a poor way, and tries to compute
18446744073709551614 before negating it.  Which doesn't
work...    Grr!

Feels like a portability issue to me now.
mmokrejsplain2003-07-29 16:53:20
Logged In: YES 
user_id=696559

I just found by luck this in cxx manual:

  -long_double_size 64 | 128
       Tru64 UNIX Version 5.0 and later has a default long
double size of 128
       bits. Although support for 64-bit long doubles has
been retired, you
       can use the -long_double_size 64 option to specify
64-bit long doubles
       if necessary. This option also defines the __X_FLOAT
macro with a
       value of 0 instead of 1. On Linux, 64 bits is the
default.

       Because specifying this option makes the long doubles
in your code
       incompatible with the long doubles in the system
libraries, the fol-
       lowing libraries are required:

             ./usr/ccs/lib/libretired_real8.a
             ./usr/shlib/libretired_real8.so

       These libraries do not ship as part of the base OS.
You must install
       the CMPDEVENH subset, which is available on the Tru64
Associated Pro-
       ducts Volume 1 CD under Development_Enhancements.

       NOTE: On Tru64 UNIX Version 4.n systems or Linux, you
can use the
       -long_double_size 128 option to specify 128-bit long
doubles. However,
       the program will function correctly only on systems
with libraries
       that support 128-bit long doubles.


I cannot find something similar in cc manpage, but might
give you a clue.
mmokrejsplain2003-07-29 17:42:29
Logged In: YES 
user_id=696559

Still happens with current cvs and gcc/g++ 3.3 on this platform.
mmokrejsplain2003-12-03 21:02:26
Logged In: YES 
user_id=696559

Still happens on same host with tcl8.4.5.
dkfplain2003-12-03 21:32:05
Logged In: YES 
user_id=79902

Those libs are unrelated (they handle the 'long double'
type, not the 'long int' type)

This appears to be a problem caused by differing
interpretations of what happens on selected kinds of
overflow.  It's not usually a problem in practice. :)
mmokrejsplain2004-05-19 16:10:57
Logged In: YES 
user_id=696559

Still present in cvs as of now:

==== get-1.10 Tcl_GetInt procedure FAILED
==== Contents of test case:

        set x 0
        list [catch {incr x -18446744073709551614} msg] $msg
    
---- Result was:
1 {integer value too large to represent}
---- Result should have been (exact matching):
0 2
==== get-1.10 FAILED
dkfplain2004-05-19 16:49:30
Logged In: YES 
user_id=79902

I need to know:
   * sizeof(long)
   * sizeof(Tcl_WideInt)
I also need to know *exactly* what flags were passed to the
compiler during the compilation of tclVar.c; copy-and-paste
of the fraction of the output from make which mentions that
file will do.
mmokrejsplain2004-05-19 17:39:06
Logged In: YES 
user_id=696559

cc -c -O -DTCL_DBGX= -DTCL_UNLOAD_DLLS=1   -I./../generic
-I./../unix -I. -DHAVE_TZSET -std1 -ieee -DPACKAGE_NAME=\"\"
-DPACK
AGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_UNIST
D_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1
-DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DTCL_WIDE_INT_IS_LONG=1
-DHAVE_GETCWD=1 -DHAVE
_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1
-DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1
-DUSE_TERM
IOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1
-DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1
-DHAVE_GMTIME_R=1 -DHAVE_LOCALTI
ME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1
-DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1
-Dsocklen_t=unsigned -DNO
_UNION_WAIT=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1
-DHAVE_CHFLAGS=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1
-DHAVE_SYS_IOCT
L_H=1 -DUSE_FIONBIO=1  
       -DTCL_SHLIB_EXT=\".so\" ./../generic/tclVar.c


For the other questions, maybe you could steal the sizeof()
checking code from configure distributed with perl and I
think a lot of other packages. Then people would know where
to look for it, when don't know which manpage to lookup or
which header files to read. ;)
dkfplain2004-05-20 16:25:47
Logged In: YES 
user_id=79902

OK, we've detected that we're on a 64-bit platform
correctly.  Thank goodness for that!  :^)

I'll need to think about this a bit more...
dgpplain2005-06-28 22:11:54
Logged In: YES 
user_id=80530

this failure reported still happening
for Tcl 8.4.11 on:

  HP HP-UX B.11.23 (ia64), HP aC++/ANSI C B3910B A.05.56:
dkfplain2005-08-28 19:35:32
Logged In: YES 
user_id=79902

It appears hpux strtoull doesn't like values in the range
-ULONG_MAX..(LONG_MIN-1)

Should we (do we?) define TCL_STRTOUL_SIGN_CHECK on that
platform? Should the HEAD use a similar strategy?
Log in (anonymous is fine) to add a comment.