HomePhabricator

Merging r338949: --------------------------------------------------------------…
57c21c9592ceUnpublished

Authored by hansw on Aug 7 2018, 12:43 AM.

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

Merging r338949: ------------------------------------------------------------------------ r338949 | lemo | 2018-08-04 04:15:26 +0200 (Sat, 04 Aug 2018) | 27 lines

Fix a bug in VMRange

I noticed a suspicious failure:

[ RUN ] VMRange.CollectionContains
llvm/src/tools/lldb/unittests/Utility/VMRangeTest.cpp:146: Failure
Value of: VMRange::ContainsRange(collection, VMRange(0x100, 0x104))

Actual: false
Expected: true

Looking at the code, it is a very real bug:

class RangeInRangeUnaryPredicate {
public:

RangeInRangeUnaryPredicate(VMRange range) : _range(range) {} // note that _range binds to a temporary!
bool operator()(const VMRange &range) const {
  return range.Contains(_range);
}
const VMRange &_range;

};

This change fixes the bug.

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


llvm-svn: 339107

Details

Committed
hanswAug 7 2018, 12:43 AM
Differential Revision
D50290: Fix a bug in VMRange
Parents
rG54bbd10d8d61: Merging r338915: --------------------------------------------------------------…
Branches
Unknown
Tags
Unknown