[SciPy-dev] Check reading the nested fields of a nested array
Travis Oliphant
oliphant.travis at ieee.org
Tue Apr 25 04:48:39 EDT 2006
Nils Wagner wrote:
> Travis Oliphant wrote:
>
>> Nils Wagner wrote:
>>
>>
>>> Travis Oliphant wrote:
>>>
>>>
>>>
>>>> Nils Wagner wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> Nils Wagner wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Travis Oliphant wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Nils Wagner wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> 0.9.7.2404 on a 64 bit system
>>>>>>>>
>>>>>>>> numpy.test(1,10) results in
>>>>>>>>
>>>>>>>> Check reading the nested fields of a nested array (1st level)*** glibc
>>>>>>>> detected *** malloc(): memory corruption (fast): 0x00000000007dee40 ***
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> Can you check to see which check-in caused the problem. Go back to
>>>>>>> revision 2403, 2402, and so forth.
>>>>>>>
>>>>>>> Also, please remove the build directory and the installed numpy to be
>>>>>>> sure changes to the C-API are not causing problems.
>>>>>>>
>>>>>>> The trace-back is not really giving a clue. Perhaps if you ran under
>>>>>>> valgrind better help could be given. Are there any warnings emmitted
>>>>>>> during compilation?
>>>>>>>
>>>>>>>
>>>>>>> Could somebody else with a 64-bit system verify?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>> BTW, the problem is not restricted to 64-bit systems. I just installed
>>>>> the latest svn version of numpy
>>>>> on a 32-bit system and got
>>>>> Check reading the nested fields of a nested array (1st level)*** glibc
>>>>> detected *** free(): invalid next size (fast): 0x081d5870 ***
>>>>> Abort
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> Please remove your installation of numpy and your build directory and
>>>> try again. I do not get these errors.
>>>>
>>>> The copyswap function changed arguments and appears to be at the root of
>>>> these problems.
>>>>
>>>> -Travis
>>>>
>>>> _______________________________________________
>>>> Scipy-dev mailing list
>>>> Scipy-dev at scipy.net
>>>> http://www.scipy.net/mailman/listinfo/scipy-dev
>>>>
>>>>
>>>>
>>>>
>>> Hi Travis,
>>>
>>> I installed numpy from scratch but the problem persists. Any idea ?
>>>
>>>
>>>
>>>
>> Did you remove your numpy from <site-packages> and the build directory
>> before building?
>>
>>
>>
> Yes.
>
>> If so, please isolate the test that is failing into a short Python
>> snippet that exhibits the error. I've just double-checked all uses of
>> copyswap to make sure they have all been changed. All tests are
>> passing for me as well (also all SciPy tests pass).
>>
>> So, I can't reproduce the problem and it smells a lot like an
>> installation problem. Are you picking up include files from some other
>> location?
>>
>>
> How can I check that ?
>
>> Can somebody else verify to see if current SVN of numpy builds and
>> passes tests?
>>
>> -Travis
>>
>>
>>
>>
>> _______________________________________________
>> Scipy-dev mailing list
>> Scipy-dev at scipy.net
>> http://www.scipy.net/mailman/listinfo/scipy-dev
>>
>>
> I found the test in test_numerictypes.py
>
> def check_nested1_acessors(self):
> """Check reading the nested fields of a nested array (1st level)"""
> h = array(self._buffer, dtype=self._descr)
> if not self.multiple_rows:
> assert_equal(h['Info']['value'],
> array(self._buffer[1][0], dtype='c16'))
> assert_equal(h['Info']['y2'],
> array(self._buffer[1][1], dtype='f8'))
> assert_equal(h['info']['Name'],
> array(self._buffer[3][0], dtype='U2'))
> assert_equal(h['info']['Value'],
> array(self._buffer[3][1], dtype='c16'))
> else:
> assert_equal(h['Info']['value'],
> array([self._buffer[0][1][0],
> self._buffer[1][1][0]],
> dtype='c16'))
> assert_equal(h['Info']['y2'],
> array([self._buffer[0][1][1],
> self._buffer[1][1][1]],
> dtype='f8'))
> assert_equal(h['info']['Name'],
> array([self._buffer[0][3][0],
> self._buffer[1][3][0]],
> dtype='U2'))
> assert_equal(h['info']['Value'],
> array([self._buffer[0][3][1],
> self._buffer[1][3][1]],
> dtype='c16'))
>
>
>
Please copy this code into a short Python file that when run i.e.
python myfile.py
exhibits the problem.
You need to adapt the support code to do it.
-Travis
More information about the SciPy-Dev
mailing list