================ Comment at: include/vector:1029 @@ -1034,1 +1028,3 @@ + __alloc_traits::__construct_range_forward(__a, __first, __last, this->__end_); + __annotator.__done(); } ---------------- mclow.lists wrote: > This is not exception safe. > If one of the constructions throws, then the ASAN annotations will be wrong. > This actually is exception safe but I had to think about it for a long time before I understood.
1. `__RAII_IncreaseAnnotate __annotator(*this, __n);`: Unpoison the next __n elements. 2. `__annotator.__done()`. commits to unpoisoning the elements. 3. `~__annotator`: If `__done()` has been called the destructor does nothing. Otherwise it re-poisons everything from __end_ on. http://reviews.llvm.org/D8109 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/ _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
