Changeset 162752 in webkit


Ignore:
Timestamp:
Jan 24, 2014, 7:15:13 PM (11 years ago)
Author:
mark.lam@apple.com
Message:

DebuggerCallFrame::evaluateWithCallFrame() should not execute a null executable.
<https://webkit.org/b/127600>

Reviewed by Oliver Hunt.

In DebuggerCallFrame::evaluateWithCallFrame(), if the script string that
is passed in is bad, it will fail to create an Executable i.e.
EvalExecutable::create() returns a null pointer. However,
DebuggerCallFrame::evaluateWithCallFrame() was just clearing the
exception and proceeded to execute the null pointer as an Executable.
A crash ensues.

Now, if an exception is detected while creating the Executable, we
abort instead.

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::evaluateWithCallFrame):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r162741 r162752  
     12014-01-24  Mark Lam  <mark.lam@apple.com>
     2
     3        DebuggerCallFrame::evaluateWithCallFrame() should not execute a null executable.
     4        <https://webkit.org/b/127600>
     5
     6        Reviewed by Oliver Hunt.
     7
     8        In DebuggerCallFrame::evaluateWithCallFrame(), if the script string that
     9        is passed in is bad, it will fail to create an Executable i.e.
     10        EvalExecutable::create() returns a null pointer. However,
     11        DebuggerCallFrame::evaluateWithCallFrame() was just clearing the
     12        exception and proceeded to execute the null pointer as an Executable.
     13        A crash ensues.
     14
     15        Now, if an exception is detected while creating the Executable, we
     16        abort instead.
     17
     18        * debugger/DebuggerCallFrame.cpp:
     19        (JSC::DebuggerCallFrame::evaluateWithCallFrame):
     20
    1212014-01-24  Oliver Hunt  <oliver@apple.com>
    222
  • trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp

    r159605 r162752  
    155155        exception = vm.exception();
    156156        vm.clearException();
     157        return jsUndefined();
    157158    }
    158159
Note: See TracChangeset for help on using the changeset viewer.