You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running with the configuration file "examples/force-exchange/testcube-dense-fs.xml", I encountered an index out-of-bounds issue.
Below, I've added comments hypothesizing the potential cause of this error, though I admit my usage is limited and I'm not entirely sure if my speculation is correct.
My operating system is Ubuntu 22.04, with gcc version 11.4.0.
if (currentCell.isBoundaryCell()) {
cellProcessor.processCell(currentCell);
// loop over all forward neighboursfor (auto& neighbourOffset : this->_forwardNeighbourOffsets) {
CellTemplate& neighbourCell = this->_cells->at(cellIndex + neighbourOffset); // Exceeding the maximum index of an array
cellProcessor.processCellPair(currentCell, neighbourCell);
}
// loop over all backward neighbours. calculate only forces// to neighbour cells in the halo region, all others already have been calculatedfor (auto& neighbourOffset : this->_backwardNeighbourOffsets) {
CellTemplate& neighbourCell = this->_cells->at(cellIndex - neighbourOffset); // The value of cellindex might be less than neighbourOffset, leading to an overflow.if (neighbourCell.isHaloCell()) {
cellProcessor.processCellPair(currentCell, neighbourCell);
}
}
} // if ( isBoundaryCell() )
The text was updated successfully, but these errors were encountered:
I think that the problem is here: this->_cells->at(cellIndex - neighbourOffset)
This can lead to "negative" (-> overflowed) results. Unfortunately, I am not really into this part of the code and I am not sure if this traversal is still in use at all.
When running with the configuration file "examples/force-exchange/testcube-dense-fs.xml", I encountered an index out-of-bounds issue.
Below, I've added comments hypothesizing the potential cause of this error, though I admit my usage is limited and I'm not entirely sure if my speculation is correct.
My operating system is Ubuntu 22.04, with gcc version 11.4.0.
The text was updated successfully, but these errors were encountered: