[Pkg-jed-sl-modules] Re: [ths@networkno.de: About alpha/mipsel
FTBFS of slcfitsio]
John E. Davis
davis at space.mit.edu
Sat Nov 19 17:28:23 UTC 2005
On Sat, 19 Nov 2005 18:06:54 +0100, Rafael Laboissiere <rafael at debian.org> said:
>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.
The read_bit_column function is called with a buffer that is malloced.
For type=TBIT, the function call sequence boils down to:
at = SLang_create_array (datatype, 0, NULL, dims, num_dims);
status = read_bit_column (f, col, row, 1, num_elements,
(unsigned char *)at->data, at->sizeof_type);
fits_read_col (f, TBYTE, col, row,
firstelem, num_elements*bytes_per_elem,
NULL, data, &anynul, &status);
byte_swap16 (data, num_elements);
Here, the buffer that is being byte-swapped is at->data which is
malloced by the slang library. At no point is a read-only buffer
being used.
Perhaps you meant something else.
Thanks,
--John
More information about the Pkg-jed-sl-modules
mailing list