Artifacts Associated With Ticket 1154163
Ticket change [faddc77abb] (rid 91958) by matzek on 2005-03-01 11:48:17:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OS: % parray tcl_platform tcl_platform(byteOrder) = littleEndian tcl_platform(machine) = alpha tcl_platform(os) = OSF1 tcl_platform(osVersion) = V5.1 tcl_platform(platform) = unix tcl_platform(user) = makr tcl_platform(wordSize) = 8 [format] returns another format string instead of result: % format "%hx" 1 lx % format "%hu" 1 lu % format "%hd" 1 ld % format "%hi" 1 ld Expected same behavior as on Solaris 8 / 64 bit: OS: % parray tcl_platform tcl_platform(byteOrder) = bigEndian tcl_platform(machine) = sun4u tcl_platform(os) = SunOS tcl_platform(osVersion) = 5.8 tcl_platform(platform) = unix tcl_platform(user) = makr tcl_platform(wordSize) = 8 % format "%hx" 1 1 % format "%hu" 1 1 % format "%hd" 1 1 % format "%hi" 1 1 I suspect the following code to be the trouble maker, although I do not have a clue what it wants to achive ... in tcl8.4.9/generic/tclCmdAH.c: 2205 #if (LONG_MAX > INT_MAX) 2206 /* 2207 * Add the 'l' for long format type because we are on an 2208 * LP64 archtecture and we are really going to pass a long 2209 * argument to sprintf. 2210 */ 2211 newPtr++; 2212 *newPtr = 0; 2213 newPtr[-1] = newPtr[-2]; 2214 newPtr[-2] = 'l'; 2215 #endif /* LONG_MAX > INT_MAX */ kind regards -- Matthias Kraft
- foundin initialized to: "obsolete: 8.4.9"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "matzek"
- subsystem initialized to: "16. Commands A-H"
- title initialized to:
[format] can not cope with 'h' length modifier on Tru64
- type initialized to: "Bug"
Ticket change [618d8ee406] (rid 92260) by matzek on 2005-03-01 19:26:51:
- icomment:
Logged In: YES user_id=330806 Well, I was right ... Inserting printf()s before and after that code shows: % format "%hx" 1 >>> format: %hx >>> format: %hlx lx And removing the lines 2211 up to and including 2213 now returns the correct result: % format "%hx" 0x12480 >>> format: %hx >>> format: %lx 2480 What's the drawback? kind regards -- Matthias Kraft
- login: "matzek"
- mimetype: "text/plain"
- username: "matzek"
- icomment:
Ticket change [13d47a7842] (rid 124286) by matzek on 2005-03-03 23:27:10:
- icomment:
Logged In: YES user_id=330806 Well, despite the fact Tcl can only be called in batch mode on AIX 5.1 / 64 bit - see bug: [ 1155891 ] TEBC segfaults (AIX 5.1 / 64 bit) - it also reveals format is also not working correctly here: /RDS/COMPSRV/prog/makr/tcl8.4.9/unix$ echo "puts [format \"%hx\" 0x12340]\n" > crashtest.tcl /RDS/COMPSRV/prog/makr/tcl8.4.9/unix$ /RDS/COMPSRV/prog/makr/tcl-8.4.9/bin/tclsh8.4 ./crashtest.tcl lx Raising priority, because this is a platform I will need 64 bit support in the near future, while Tru64 is dying out... kind regards -- Matthias Kraft - login: "matzek"
- mimetype: "text/plain"
- priority changed to: "7 High"
- title changed to:
bug in 'h' length modifier of [format] on AIX 5/64 & Tru64
- username: "matzek"
- icomment:
Ticket change [6af8cf5c9e] (rid 128238) by msofer on 2005-03-03 23:33:24:
- icomment:
Logged In: YES user_id=148712 I'd keep this in the backburner until we sort out 1155891: that one looks like mem corruption. This bug may just be a symptom ...
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [371ab8afc4] (rid 107221) by dkf on 2005-03-08 04:30:29:
- priority changed to: "8"
Ticket change [edf1613a2f] (rid 103997) by dkf on 2005-03-08 04:30:30:
- icomment:
Logged In: YES user_id=79902 Looks to me like we need to ensure that h is not mixed with l (or ll, but that's a 32-bit machine thing). Approximately, h=>16-bit, no-mod=>32-bit/machine-word, l=>64-bit, so mixing them doesn't make sense...
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [72374dc692] (rid 100820) by dkf on 2005-06-18 06:42:43:
- closedate changed to: "2005-06-17T23:42:43"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 I think I've fixed this now (8.4 branch and HEAD). Sorry for taking so long
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"