Working on this bug is a bit difficult as it seems that there are currently no Debian ARM machines available.
Thanks to the excellent work of Dominique Belhachemi, who has setup
an ARM system using qemu, there is now the chance of actually trying
to track down this bug.
see http://www.aurel32.net/info/debian_arm_qemu.php
There have been a number of mails between Dominique and me, but
unfortunately they are all in German. I'll try to provide a
(hopefully) comprehensive summary of what we know so far.
@Dominique: Let's switch to English and keep [EMAIL PROTECTED]
CC'ed.
Ok, here we go:
* In contrast to the buildd-logs exactly the tests that fail for version
0.5 also fail for version 0.6. The only difference seems to be that
the emulated ARM system uses a different kernel (2.6.8.15).
* It doesn't matter if etch or a current sid is used, the same tests
fail with the same error message.
* The error message for all tests using nifti1_test is:
** failed to alloc 1140850688 bytes for image data
all other tests fail, because they depend on the output of
nifti1_test.
* Simply loading an image with 'nifti1_test' on ARM, causes the above
error. 'nifti1_test' does not do any particular magic. It only calls a
single library function to load the test image.
* The ultimate reason for the error is an incorrect calculation of the
number of voxels (volume elements) in the image data. This number is
used to allocate the necessary amount of memory required to load the
image data.
'nvox' calculated in
size_t nifti_get_volsize(const nifti_image
*nim):niftilib/nifti1_io.c:2177
should be 90321 (product of volume extent along all dims:
23*17*11*7*3), but actually is not, because the 'dim' array contains
wrong values.
Dominique discovered that the content of this array is correct until
nim = nifti_convert_nhdr2nim(nhdr,hfile); in niftilib/nifti1_io.c:3683
is executed. Apparently the content is modified, in this code snippet
3059 nifti_image* nifti_convert_nhdr2nim(struct nifti_1_header nhdr,
3060 const char * fname)
3061 {
3062 int ii , doswap , ioff ;
3063 int is_nifti , is_onefile ;
3064 nifti_image *nim;
3065
3066 nim = (nifti_image *) calloc( 1 , sizeof(nifti_image) ) ;
it remains intact until line 3066 is executed (is that correct
Dominique?)
If this is the case, one possible cause of the bug could be that the
library accidentally frees some memory (somewhere in the chain) that
belongs to the dim array.
So far,
Michael
--
GPG key: 1024D/3144BE0F Michael Hanke
http://apsy.gse.uni-magdeburg.de/hanke
ICQ: 48230050
signature.asc
Description: Digital signature

