Skip to content

Conversation

@reuk
Copy link
Contributor

@reuk reuk commented Apr 16, 2017

The insert on line 262 invalidates the iterators of the vector which is
being iterated, which may cause the reference on line 206 to dangle.
This in turn leads to undefined behaviour on line 269 when the reference
is passed to a function.

The fix is to take a copy instead of a reference on line 206.

The insert on line 262 invalidates the iterators of the vector which is
being iterated, which may cause the reference on line 206 to dangle.
This in turn leads to undefined behaviour on line 269 when the reference
is passed to a function.

The fix is to take a copy instead of a reference on line 206.
@reuk reuk changed the title Fix pointer-invalidation bug in ansi-c/padding.cpp Fix iterator-invalidation bug in ansi-c/padding.cpp Apr 17, 2017
@kroening kroening merged commit f79100f into diffblue:master Apr 17, 2017
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.

3 participants