• Seth Brenith's avatar
    Fix brittleness of GetObjectProperties test · 51d2e988
    Seth Brenith authored
    Part of the GetObjectProperties test case is for verifying the human-
    readable brief object description string that GetObjectProperties
    returns. That string might look something like this:
    
    "xy" (0x28f038d5 <v8::internal::SeqOneByteString>)
    
    GetObjectProperties also tries to detect known immortal objects by
    recognizing their addresses, which is useful in crash dumps with limited
    memory. The recognized object name, if it exists, is prepended to the
    description string. In order to provide this data accurately (in builds
    without pointer compression), GetObjectProperties relies on the caller
    to provide the addresses of the first pages in read-only space, map
    space, and old space. If the caller doesn't provide those addresses,
    then GetObjectProperties does the best it can with limited information
    and reports possible matches based on an object's offset within the heap
    page that contains it. So the result string might look like this, if the
    object happened to get allocated at a lucky offset within its page:
    
    maybe LoadHandler3Map "xy" (0x28f038d5 <v8::internal::SeqOneByteString>)
    
    As a result, when testing these descriptions, we should generally check
    that they contain the interesting data rather than that they start with
    it, because some incorrect "maybe" match with a known object might be
    included at the beginning.
    
    Bug: v8:10034
    Change-Id: I0cf5afd67793a239614aba3665ef57cd2d663a47
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1950233Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#65432}
    51d2e988
Name
Last commit
Last update
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...