Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARCMT uses an iterator after invalidation #15872

Closed
AaronBallman opened this issue Mar 12, 2013 · 3 comments
Closed

ARCMT uses an iterator after invalidation #15872

AaronBallman opened this issue Mar 12, 2013 · 3 comments
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category

Comments

@AaronBallman
Copy link
Collaborator

Bugzilla Link 15500
Resolution FIXED
Resolved on Apr 01, 2013 16:13
Version trunk
OS Windows NT
CC @akyrtzi,@rnk

Extended Description

r171828 introduces a regression where ARCMT uses a std::list iterator after invalidation. From the email thread:

"The use of iterators here is problematic because
handleProtectedScopeError can invalidate the iterators. This is
causing a failed assertion in debug build of MSVC11 where there are
checked iterators involved.

From what I am seeing, handleProtectedScopeError has a Transaction
object, which on destruction winds up calling
CapturedDiagList::clearDiagnostic, and that calls erase on the list,
which invalidates the iterators. Attempting to perform the comparison
then fires the assert.

I'm not entirely certain of the best way to solve this issue, but I
figured I would mention that it causes problems. We have a test case
already demonstrating the issue with test\ARCMT\protected-scope.m"

@akyrtzi
Copy link
Contributor

akyrtzi commented Mar 13, 2013

cloned to rdar://problem/13411432

@rnk
Copy link
Collaborator

rnk commented Mar 26, 2013

Any updates?

@akyrtzi
Copy link
Contributor

akyrtzi commented Apr 1, 2013

Should be fixed in r178500

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 4, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

3 participants