Status: resolved
Severity:
failure
Category: Tclkit
Created: 2008-01-25
Updated: 2008-02-24
sdx mksplit and similar commands don't work under linux/amd64. The error reported is "this code needs to be finished..."
I've found the problem. The code
if {[format %x [expr $a] eq "80000000"} {
set start [expr {$end - 16 - $b}]
} else {
# if the file is in commit-progress state, we need to do more
fail "this code needs to be finished..."
}
fails under 64 bit platforms since the value to read from file is "0x80000000" and it is sign-extended to 64 bits and becomes "0xffffffff80000000". This line ("0xffffffff80000000") is generated by format and comparison fails.
I've fixed the problem by changing the first line of code to
if {[format %x [expr {$a & 0xffffffff}] eq "80000000"} {
and it worked. The files to be fixed are: mksplit.tcl mkinfo.tcl mkpack.tcl wrap.tcl .
- 2008-01-25 Vadim_Z
Created
- 2008-02-24 jcw
Thank you Vadim, I've added your proposed fix.
- 2008-02-24 jcw
(Changed: stat)
