If input motif matrix has a number of positions < to #nucleotides (4 only in current implementation), there is a memory overflow.
Funnily, this doesn't avoid to do pvalue computations without any crash.
However, when activating sanitizer, it is clearly raised.
// Matrix.h
void Matrix::computesIntegerMatrix (double granularity, bool sortColumns) {
// [...]
matInt = new long long *[length];
for (int k = 0; k < 4; k++ ) {
matInt[k] = new long long[length]; // << == overflow, as k will be > length
std::cout << "test" << std::endl;
for (int p = 0 ; p < length; p++) {
matInt[k][p] = ROUND_TO_INT((double)(mat[k][p]*this->granularity));
}
}
// [...]
}
This will need fix for any future version that will allow amino acids motifs or any generic alphabet.
If input motif matrix has a number of positions < to #nucleotides (4 only in current implementation), there is a memory overflow.
Funnily, this doesn't avoid to do pvalue computations without any crash.
However, when activating sanitizer, it is clearly raised.
This will need fix for any future version that will allow amino acids motifs or any generic alphabet.