Commit 55d24311 authored by Jim Ingham's avatar Jim Ingham
Browse files

If the MemoryCache is asked to look up an address that is in an invalid

range, it should set the error in the Error passed into the function.

llvm-svn: 181386
parent cba4a0c5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -128,7 +128,10 @@ MemoryCache::Read (addr_t addr,
        while (bytes_left > 0)
        {
            if (m_invalid_ranges.FindEntryThatContains(curr_addr))
            {
                error.SetErrorStringWithFormat("memory read failed for 0x%" PRIx64, curr_addr);
                return dst_len - bytes_left;
            }

            BlockMap::const_iterator pos = m_cache.find (curr_addr);
            BlockMap::const_iterator end = m_cache.end ();