[Webkit-unassigned] [Bug 226503] New: Fix inadvertent tag corruption in functionAddressOf

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 1 09:33:32 PDT 2021


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

            Bug ID: 226503
           Summary: Fix inadvertent tag corruption in functionAddressOf
           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: mikhail at igalia.com

Created attachment 430269

  --> https://bugs.webkit.org/attachment.cgi?id=430269&action=review

test case

The attached program triggers an assertion failure when running jsc in 32 bits and debug mode.

In 32 bits, asCell() returns a pointer to the payload and using reinterpret_cast will sign extend asNumber to FFFF FFFF + <value-address>, which will fail the isImpureNaN in jsNumber. 

So first cast the address to uint32_t then to uint64_t to prevent the tag corruption.

-- 
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/20210601/2e46d915/attachment.htm>


More information about the webkit-unassigned mailing list