Failing (crashing) nosetests in debug mode
Created by: siebenkopf
When compiled in debug mode, the following nose test:
$ bin/nosetests bob.learn.libsvm.test_machine:test_data_loading -vs
will crash with a:
[Blitz++] Precondition failure: Module /remote/idiap.svm/group.torch5spro/externals/py27-debug/usr/include/blitz/array/slicing.cc line 303
Slice is out of range for array: index=270 rank=0
Possible range for index: [0, 269]
python: /remote/idiap.svm/group.torch5spro/externals/py27-debug/usr/include/blitz/array/slicing.cc:303: void blitz::Array<P_numtype, N_rank>::slice(int&, int, blitz::Array<P_numtype, N_rank2>&, blitz::TinyVector<int, N_rank>&, int) [with int N_rank2 = 2; P_numtype = double; int N_rank = 1]: Assertion `0' failed.
Aborted
The issue seems to be located in https://github.com/bioidiap/bob.learn.libsvm/blob/master/bob/learn/libsvm/file.cpp#L492, where the k index is getting too high.
To reproduce the issue, checkout bob.learn.libsvm, bootstrap with the debug python version, e.g.:
$ /idiap/group/torch5spro/externals/py27-debug/usr/bin/python bootstrap-buildout.py
and run the command above.
Happy debugging!