Ignore:
Timestamp:
Dec 19, 2011, 7:16:21 PM (13 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=74903
Exceptions not thrown correctly from DFG JIT on 32bit

Reviewed by Oliver Hunt.

Arguments for lookupExceptionHandler are not setup correctly.
In the case of ARMv7 we rely on lr being preserved over a call,
this in invalid. On x86 we don't should be poking the arguments onto the stack!

Source/JavaScriptCore:

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::bytecodeOffsetForCallAtIndex):

  • dfg/DFGAssemblyHelpers.h:

(JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):

  • dfg/DFGGPRInfo.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileBody):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::addExceptionCheck):
(JSC::DFG::JITCompiler::addFastExceptionCheck):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:

LayoutTests:

  • fast/js/dfg-exception-expected.txt: Added.
  • fast/js/dfg-exception.html: Added.
  • fast/js/script-tests/dfg-exception.js: Added.

(doesntDFGCompile):
(test):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r103292 r103294  
     12011-12-19  Gavin Barraclough  <[email protected]>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=74903
     4        Exceptions not thrown correctly from DFG JIT on 32bit
     5
     6        Reviewed by Oliver Hunt.
     7
     8        Arguments for lookupExceptionHandler are not setup correctly.
     9        In the case of ARMv7 we rely on lr being preserved over a call,
     10        this in invalid. On x86 we don't should be poking the arguments onto the stack!
     11
     12        * bytecode/CodeBlock.h:
     13        (JSC::CodeBlock::bytecodeOffsetForCallAtIndex):
     14        * dfg/DFGAssemblyHelpers.h:
     15        (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):
     16        * dfg/DFGGPRInfo.h:
     17        * dfg/DFGJITCompiler.cpp:
     18        (JSC::DFG::JITCompiler::compileBody):
     19        * dfg/DFGJITCompiler.h:
     20        (JSC::DFG::JITCompiler::addExceptionCheck):
     21        (JSC::DFG::JITCompiler::addFastExceptionCheck):
     22        * dfg/DFGOperations.cpp:
     23        * dfg/DFGOperations.h:
     24
    1252011-12-19  Filip Pizlo  <[email protected]>
    226
Note: See TracChangeset for help on using the changeset viewer.