Skip to content
Snippets Groups Projects
user avatar
Tom Stellard authored
------------------------------------------------------------------------
r327863 | sepavloff | 2018-03-19 09:13:43 -0700 (Mon, 19 Mar 2018) | 12 lines

[Driver] Avoid invalidated iterator in insertTargetAndModeArgs

Doing an .insert() can potentially invalidate iterators by reallocating the
vector's storage. When all the stars align just right, this causes segfaults
or glibc aborts.

Gentoo Linux bug (crashes while building Chromium): https://bugs.gentoo.org/650082.

Patch by Hector Martin!

Differential Revision: https://reviews.llvm.org/D44607

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_60@333507 91177308-0d34-0410-b5e6-96231b3b80d8
1de54aa9
History