• ishell@chromium.org's avatar
    Reland "[ext-code-space] Fix Code vs non-Code comparisons" · 76651622
    ishell@chromium.org authored
    This is a reland of commit 9b0d5cb1
    
    The newly added check does not allow comparisons with stale or
    invalid pointers because attempt to access the page header might
    crash.
    
    Original change's description:
    > [ext-code-space] Fix Code vs non-Code comparisons
    >
    > When external code space is enabled comparing Code and non-Code objects
    > by looking at compressed values is not always correct. Such an approach
    > works only for comparing Code vs Code objects or non-Code vs non-Code
    > objects.
    >
    > This CL instroduces SLOW_DCHECK into Object comparison operators to
    > ensure that such a comparison is allowed. Also, this CL instroduces
    > an Object::SafeEquals() method which compares uncompressed values
    > and thus is safe to be used for comparing Code with non-Code objects.
    >
    > Bug: v8:11880
    > Change-Id: I7ccf1f90f927beb2bb9f45efb303e902b1838d02
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3838172
    > Reviewed-by: Jakob Linke <jgruber@chromium.org>
    > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
    > Commit-Queue: Igor Sheludko <ishell@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#82611}
    
    Bug: v8:11880
    Change-Id: Iab3c8fe49cb954b2dc9171b3fc4b189e84763e73
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3842932Reviewed-by: 's avatarJakob Linke <jgruber@chromium.org>
    Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#82624}
    76651622
tagged-impl.cc 1.95 KB