NumPy frombuffer giving nonsense values when reading C float array on Windows
sth
urschrei at gmail.com
Tue Jul 26 12:47:58 EDT 2016
On Tuesday, 26 July 2016 16:36:33 UTC+1, Christian Gollwitzer wrote:
> Am 26.07.16 um 17:09 schrieb sth:
> > it's difficult to test a .dylib / .so using valgrind
>
> Why is it difficult? If you have a python script such that
>
> python mytests.py
>
> loads the .so and runs the tests, then
>
> valgrind --tool=memcheck python mytests.py
>
> should work. This should immediately spit out an error in case that
> numpy accesses deleted memory.
>
> Of course debug information should be enabled when compiling the .so for
> more useful output, and it could be helpful to have it for numpy/python,
> too, but that's not a requirement.
>
> Christian
Valgrind isn't giving me any errors; it's reporting possibly-lost memory, but this is constant -- if I call the foreign functions once or 10^6 times, the number of bytes it reports possibly lost (and the number of bytes it reports still reachable) remain the same.
More information about the Python-list
mailing list