-
Notifications
You must be signed in to change notification settings - Fork 62
Debugging
Martin Albrecht edited this page Jul 15, 2017
·
3 revisions
C++ backraces are currently broken in cysignals, a partial fix is available as a pull request.
-
Build Fplll with debugging enabled
make clean CXXFLAGS="-O0 -ggdb -DDEBUG" ./configure --prefix=$VIRTUAL_ENV --disable-static make -j4 install
-
Build Fpylll with debugging enabled
rm -r build CXXFLAGS="-O0 -ggdb -DDEBUG" python setup.py install
gdb --args python test.py
-
You may want to download (valgrind-python.supp)[http://svn.python.org/projects/python/trunk/Misc/valgrind-python.supp]
-
Uncomment the lines for
PyObject_Free
andPyObject_Realloc
, also add variants for 8 bytes:{ ADDRESS_IN_RANGE/Invalid read of size 4 Memcheck:Addr4 fun:PyObject_Free } { ADDRESS_IN_RANGE/Invalid read of size 4 Memcheck:Value4 fun:PyObject_Free } { ADDRESS_IN_RANGE/Invalid read of size 8 Memcheck:Addr8 fun:PyObject_Free } { ADDRESS_IN_RANGE/Invalid read of size 8 Memcheck:Value8 fun:PyObject_Free } { ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value Memcheck:Cond fun:PyObject_Free } { ADDRESS_IN_RANGE/Invalid read of size 4 Memcheck:Addr4 fun:PyObject_Realloc } { ADDRESS_IN_RANGE/Invalid read of size 4 Memcheck:Value4 fun:PyObject_Realloc } { ADDRESS_IN_RANGE/Invalid read of size 8 Memcheck:Addr8 fun:PyObject_Realloc } { ADDRESS_IN_RANGE/Invalid read of size 8 Memcheck:Value8 fun:PyObject_Realloc } { ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value Memcheck:Cond fun:PyObject_Realloc }
-
Run valgrind
valgrind --suppressions=valgrind-python.supp python test.py