Skip to content

Conversation

@per-gron
Copy link

It seems that iterating starting from 1 is a simple typo here. It causes the two objects that are first in these two arrays not to be deallocated.

The objects were allocated in radTInteraction::CountMainRelaxElems.

I found this with Address Sanitizer. The change removes the warning and seems to work. The change is tested on Linux/Clang only.

It seems that iterating starting from 1 is a simple typo here. It
causes the two objects that are first in these two arrays not to
be deallocated.

The objects were allocated in radTInteraction::CountMainRelaxElems.
inline void radTInteraction::EmptyVectOfPtrToListsOfTrans()
{
for(unsigned i=1; i<IntVectOfPtrToListsOfTransPtr.size(); i++)
for(unsigned i=0; i<IntVectOfPtrToListsOfTransPtr.size(); i++)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. I'll make more tests / debugging, and will probably merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants