On Wed, 5 Mar 2014, Tim Jenness wrote:
> On Wed, Mar 5, 2014 at 12:50 PM, Graham Bell
> <[log in to unmask]> wrote:
> I first would like to know if (a) GAIA
> works for anyone after the update
> and (b) it specifically works for people
> running mavericks.
>
>
> It works for me in my build on ipu. I would have rebuilt
> Starlink after the autotools merge, but into my existing
> Starlink install tree.
>
>
> ipu is a linux box? And it works with the catalogue copy?
>
> Running the debugger I'm getting the crash in tclStrToD when trying to
> parse a long number 922337203685477580.
>
>
> For the record the number is 9223372036854775808 (I had dropped a digit)
> which in negative form is VAL__BADK and in positive form is one largest than
> the largest signed 64-bit integer.
>
> It turns out that tcl seems to dislike the -ftrapv compiler flag and this
> large 64-bit integer causes an overflow.
>
> -ftrapv
>
> Generate code to catch integer overflow errors. Signed integer
> overflow
>
> is undefined in C, with this flag, extra code is generated to
> detect
>
> this and abort when it happens.
>
>
> I must have had the -ftrapv in there for testing SMURF and forgot about it.
> TCL seems to have a bug in it but I can't really test with tcl/tk 8.6 as
> Starlink won't build with that version (which is another problem in itself).
> I couldn't really work out which line of tcl code was causing the bug, just
> that it was being asked to parse that large number.
FYI:
The crash happens in clock.tcl, around:
# Package up a list of tuples, each of which contains transition time,
# seconds east of Greenwich, DST flag and time zone abbreviation.
set r {}
set lastTime $MINWIDE
foreach t $times c $codes {
if { $t < $lastTime } {
return -code error "$fileName has times out of order"
}
set lastTime $t
lassign [lindex $types $c] gmtoff isDst abbrInd
set abbrev [dict get $abbrevs $abbrInd]
lappend r [list $t $gmtoff $isDst $abbrev]
}
MINWIDE is defined as: -9223372036854775808. The offending line in GAIA
is:
clock format [clock seconds] -format "%d-%b-%Y"
just getting a date to append to the copied file.
The same issue would probably happen with Tcl 8.6 as clock.tcl still
uses this code.
Cheers,
Peter.
|