forked from OSchip/llvm-project
[BOLT] Do not assert on bad data
Summary: A test is asserting on impossible addresses coming from perf.data, instead of just reporting it as bad data. Fix this behavior. (cherry picked from FBD6835590)
This commit is contained in:
parent
626e977c4a
commit
48370744d9
|
@ -307,9 +307,8 @@ bool BinaryFunction::recordEntry(uint64_t To, bool Mispred, uint64_t Count) {
|
|||
}
|
||||
|
||||
bool BinaryFunction::recordExit(uint64_t From, bool Mispred, uint64_t Count) {
|
||||
if (!isSimple())
|
||||
if (!isSimple() || From > getSize())
|
||||
return false;
|
||||
assert(From <= getSize() && "wrong From address");
|
||||
|
||||
if (!hasProfile())
|
||||
ExecutionCount = 0;
|
||||
|
|
Loading…
Reference in New Issue