[Webkit-unassigned] [Bug 186004] New: MachineContext's instructionPointer() should handle null PCs correctly.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 25 16:34:19 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=186004

            Bug ID: 186004
           Summary: MachineContext's instructionPointer() should handle
                    null PCs correctly.
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mark.lam at apple.com

instructionPointer() returns a MacroAssemblerCodePtr<CFunctionPtrTag>.  However MacroAssemblerCodePtr's constructor does not accept a nullptr and will assert accordingly with a debug ASSERT.  This is inconsequential for release builds, but to avoid this assertion failure, we should check for a null PC and return MacroAssemblerCodePtr<CFunctionPtrTag>(nullptr) instead (which uses the MacroAssemblerCodePtr(std::nullptr_t) constructor instead).

Alternatively, we can change all of MacroAssemblerCodePtr's constructors to check for null pointers, but I rather not do that yet.  In general, MacroAssemblerCodePtrs are constructed with non-null pointers, and I prefer to leave it that way for now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180525/44047962/attachment-0001.html>


More information about the webkit-unassigned mailing list