About alpha/mipsel FTBFS of slcfitsio
ths at networkno.de
Fri Nov 18 12:39:09 UTC 2005
I think the runtime error is caused by the byte swapping in
src/cfitsio-module.c. The byte_swap*() functions try to swap in-place.
write_tbit_col() provides an dynamic buffer and copies the data first,
but read_bit_column() doesn't, which means it tries to change read-only
data on little endian machines.
This fails for little endian architectures which keep such data in
read-only sections of their object format, for other little endian
machines it is a (probably hidden) bug as soon as the data is read
a second time, because it would get swapped back to the wrong endianess
The solution is to either add a intermediate buffer in read_bit_column()
or to change the swap functions to do a swap-and-copy to a different
place. The latter is more efficient in some cases.
More information about the Pkg-jed-devel