The code is very long (about 25000 lines) so I cant show it all here
The variable prfLength is passed into a function with the following prototype:
The function is then called as follows:
void calcGapPenaltyMask(int prfLength, vector<char>* mask, vector<char>* gapMask);
I can see that the _length variable has the value that I expect using the debugger. I have run valgrind on it, and there is definitely some problems. But it seems to be pointing to invalid read and writes in the libstdc++ library. But im sure this isnt the case.
int _length = alignmentObj.getSeqLength(1);
calcGapPenaltyMask(_length, getSecStructMask(), getGapMask());