⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243596 in webkit


Ignore:
Timestamp:
Mar 27, 2019, 6:06:01 PM (7 years ago)
Author:
sbarati@apple.com
Message:

validateOSREntryValue with Int52 should box the value being checked into double format
https://bugs.webkit.org/show_bug.cgi?id=196313
<rdar://problem/49306703>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/validate-int-52-ai-state.js: Added.

Source/JavaScriptCore:

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::validateAIState):

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r243560 r243596  
     12019-03-27  Saam Barati  <sbarati@apple.com>
     2
     3        validateOSREntryValue with Int52 should box the value being checked into double format
     4        https://bugs.webkit.org/show_bug.cgi?id=196313
     5        <rdar://problem/49306703>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        * stress/validate-int-52-ai-state.js: Added.
     10
    1112019-03-27  Yusuke Suzuki  <ysuzuki@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r243560 r243596  
     12019-03-27  Saam Barati  <sbarati@apple.com>
     2
     3        validateOSREntryValue with Int52 should box the value being checked into double format
     4        https://bugs.webkit.org/show_bug.cgi?id=196313
     5        <rdar://problem/49306703>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        * dfg/DFGOSREntry.cpp:
     10        (JSC::DFG::prepareOSREntry):
     11        * ftl/FTLLowerDFGToB3.cpp:
     12        (JSC::FTL::DFG::LowerDFGToB3::validateAIState):
     13
    1142019-03-27  Yusuke Suzuki  <ysuzuki@apple.com>
    215
  • trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp

    r242990 r243596  
    215215                return nullptr;
    216216            }
    217             // Constant AnyInt value is stored as usual boxed value in AbstractValue.
     217            value = jsDoubleNumber(value.asAnyInt());
    218218            format = FlushedInt52;
    219219        }
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r243530 r243596  
    650650                    } else {
    651651                        input = JSValue::decode(context.gpr(reg));
     652                        if (flushFormat == FlushedInt52) {
     653                            RELEASE_ASSERT(input.isAnyInt());
     654                            input = jsDoubleNumber(input.asAnyInt());
     655                        }
    652656                        if (!value.validateOSREntryValue(input, flushFormat))
    653657                            dumpAndCrash();
Note: See TracChangeset for help on using the changeset viewer.