Skip to content

Crash during llvm-ld #10011

Closed
Closed
@llvmbot

Description

@llvmbot
Bugzilla Link 9639
Resolution FIXED
Resolved on Apr 09, 2011 00:51
Version 2.8
OS Windows XP
Reporter LLVM Bugzilla Contributor
CC @efriedma-quic

Extended Description

AliasSetTracker.h

void removeCallSite(CallSite CS) {
for (size_t i = 0, e = CallSites.size(); i != e; ++i)
if (CallSites[i] == CS.getInstruction()) {
CallSites[i] = CallSites.back();
CallSites.pop_back();
}
}

this code is wrong, it caches the size of the vector but it doesn't update the size after removing an element from the vector

this piece of code fixes it

void removeCallSite(CallSite CS) {
for (size_t i = 0; i != CallSites.size(); ++i)
if (CallSites[i] == CS.getInstruction()) {
CallSites[i] = CallSites.back();
CallSites.pop_back();
}
}

Thanks,
Miguel

Metadata

Metadata

Assignees

Labels

bugzillaIssues migrated from bugzilla

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions