Ignore:
Timestamp:
Nov 16, 2017, 7:08:10 AM (8 years ago)
Author:
[email protected]
Message:

Fix null pointer dereference in bytecodeDumper
https://bugs.webkit.org/show_bug.cgi?id=179764

Reviewed by Mark Lam.

The problem was just a call to lastSeenCallee() that was unguarded by haveLastSeenCallee().

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::printCallOp):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/BytecodeDumper.cpp

    r224594 r224916  
    587587#if ENABLE(JIT)
    588588        if (CallLinkInfo* info = map.get(CodeOrigin(location))) {
    589             JSObject* object = info->lastSeenCallee();
    590             if (auto* function = jsDynamicCast<JSFunction*>(*vm(), object))
    591                 out.printf(" jit(%p, exec %p)", function, function->executable());
    592             else
    593                 out.printf(" jit(%p)", object);
     589            if (info->haveLastSeenCallee()) {
     590                JSObject* object = info->lastSeenCallee();
     591                if (auto* function = jsDynamicCast<JSFunction*>(*vm(), object))
     592                    out.printf(" jit(%p, exec %p)", function, function->executable());
     593                else
     594                    out.printf(" jit(%p)", object);
     595            }
    594596        }
    595597
Note: See TracChangeset for help on using the changeset viewer.