Changeset 277942 in webkit


Ignore:
Timestamp:
May 23, 2021, 9:59:35 PM (4 years ago)
Author:
mark.lam@apple.com
Message:

Remove some now invalid tests in testmasm.
https://bugs.webkit.org/show_bug.cgi?id=226155

Reviewed by Yusuke Suzuki.

The ARM64E tests were checking that cageConditionallyAndUntag() would fail to
produce a caged pointer if fed invalid values. These tests are no longer feasible
because on ARM64E, feeding cageConditionallyAndUntag() invalid values will now
result in a crash. This patch removes these tests.

  • assembler/testmasm.cpp:

(JSC::testCagePreservesPACFailureBit):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/Source/JavaScriptCore/ChangeLog

    r277936 r277942  
     12021-05-23  Mark Lam  <mark.lam@apple.com>
     2
     3        Remove some now invalid tests in testmasm.
     4        https://bugs.webkit.org/show_bug.cgi?id=226155
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        The ARM64E tests were checking that cageConditionallyAndUntag() would fail to
     9        produce a caged pointer if fed invalid values.  These tests are no longer feasible
     10        because on ARM64E, feeding cageConditionallyAndUntag() invalid values will now
     11        result in a crash.  This patch removes these tests.
     12
     13        * assembler/testmasm.cpp:
     14        (JSC::testCagePreservesPACFailureBit):
     15
    1162021-05-23  Mark Lam  <mark.lam@apple.com>
    217
  • TabularUnified trunk/Source/JavaScriptCore/assembler/testmasm.cpp

    r277936 r277942  
    11/*
    2  * Copyright (C) 2017-2020 Apple Inc. All rights reserved.
     2 * Copyright (C) 2017-2021 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    24472447    auto cage = compile([] (CCallHelpers& jit) {
    24482448        emitFunctionPrologue(jit);
    2449         jit.cageConditionallyAndUntag(Gigacage::Primitive, GPRInfo::argumentGPR0, GPRInfo::argumentGPR1, GPRInfo::argumentGPR2);
     2449        constexpr GPRReg storageGPR = GPRInfo::argumentGPR0;
     2450        constexpr GPRReg lengthGPR = GPRInfo::argumentGPR1;
     2451        constexpr GPRReg scratchGPR = GPRInfo::argumentGPR2;
     2452        jit.cageConditionallyAndUntag(Gigacage::Primitive, storageGPR, lengthGPR, scratchGPR);
    24502453        jit.move(GPRInfo::argumentGPR0, GPRInfo::returnValueGPR);
    24512454        emitFunctionEpilogue(jit);
     
    24602463    void* taggedNotCagedPtr = tagArrayPtr(notCagedPtr, 1);
    24612464
    2462     if (isARM64E()) {
    2463         CHECK_NOT_EQ(invoke<void*>(cage, taggedPtr, 2), ptr);
    2464         CHECK_NOT_EQ(invoke<void*>(cage, taggedNotCagedPtr, 1), ptr);
    2465         void* cagedTaggedNotCagedPtr = invoke<void*>(cage, taggedNotCagedPtr, 1);
    2466         CHECK_NOT_EQ(cagedTaggedNotCagedPtr, removeArrayPtrTag(cagedTaggedNotCagedPtr));
    2467     } else
     2465    if (!isARM64E())
    24682466        CHECK_EQ(invoke<void*>(cage, taggedPtr, 2), ptr);
    24692467
Note: See TracChangeset for help on using the changeset viewer.