Overview
| Artifact ID: | 59801c8edf946da3dd2c7bfe4cfb52468496c524 |
|---|---|
| Ticket: | 219223ffffffffffffffffffffffffffffffffff
64 bit format command behaves differently to the 32bit forma |
| User & Date: | nobody on 2000-10-26 05:03:48 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 4087 Bug Version: 8.3b2 SubmitDate: '2000-01-26' LastModified: '2000-04-09' Severity: SER Status: Assigned Submitter: techsupp ChangedBy: hobbs RelatedBugIDs: 653 OS: Solaris OSVersion: Solaris 7 64 bit Machine: Ultra Enterprise 4500 FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Matthew Finch ReproducibleScript: If I compile tcl8.3b2 in 64 bit mode on Solaris 7 using -xarch=v9 then perform the following I get.... # ./tclsh % format %X 4294967290 integer value too large to represent as non-long integer % If I compile tcl8.3b2 in 32 bit mode on Solaris 7 then perform the following I get... # ./tclsh % format %X 4294967290 FFFFFFFA % The problem is relates to the casting in Tcl_GetIntFromObj() if (((long)((int)l)) == l) { *intPtr = (int)objPtr->internalRep.longValue; return TCL_OK; } The results should be the same. ObservedBehavior: If I compile tcl8.3b2 in 64 bit mode on Solaris 7 using -xarch=v9 then perform the following I get.... # ./tclsh % format %X 4294967290 integer value too large to represent as non-long integer % DesiredBehavior: I expect to see the same behaviour as when I compiled tclsh on Solaris 7 in 32 bit mode e.g # ./tclsh % format %X 4294967290 FFFFFFFA % Actually, there is some level of correctness here. The number the user is using is just -6 as far as Tcl is concerned on a 32bit system. When there are true longs, then Tcl handles the number properly in certain contexts. However, format currently isn't one of them. This should be revisited in 8.4 to look at expanding the use of Tcl_GetLongFromObj, which would solve the problem here. We just need to make sure it won't confuse something else down the chain that will choke on the long value. -- 04/09/2000 hobbs - foundin changed to: "obsolete: 8.3b2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "81. Bundled Packages"
- title changed to:
64 bit format command behaves differently to the 32bit forma
- type changed to: "Bug"