Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 449c42b27f306b9b4906702b33d9f731dd558055
https://github.com/WebKit/WebKit/commit/449c42b27f306b9b4906702b33d9f731dd558055
Author: Mark Lam <[email protected]>
Date: 2026-07-01 (Wed, 01 Jul 2026)
Changed paths:
A JSTests/stress/expression-info-multi-wide-encoding.js
M Source/JavaScriptCore/bytecode/ExpressionInfo.cpp
Log Message:
-----------
ExpressionInfo::Encoder computes the offset to Extension Islands incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=312525
rdar://174626446
Reviewed by Yijia Huang.
When an Extension ExpressionInfo is emitted, it needs to encode a displacement
offset from
its location to the location of its extension island. For a MultiWide
ExpressionInfo,
parts of its island has already been emitted (from copying the MultiWide record
over). As
a result, the size of m_expressionInfoEncodedInfo is no longer the same as the
starting
offset of extension island. As a result, the offset encoded in the Extension
ExpressionInfo
will be incorrect.
The fix is simply to cache the location of the extension island before we start
copying the
MultiWide ExpressionInfo over. We will use this cached location to emit the
Extension
ExpressionInfo instead of using m_expressionInfoEncodedInfo.size() as we do for
other cases.
Also fixed some typos and errors in comments.
Also fixed the decoding of DuoWide field2 in ExpressionInfo::dumpEncodedInfo().
This is
only used for debugging code.
Test: JSTests/stress/expression-info-multi-wide-encoding.js
* JSTests/stress/expression-info-multi-wide-encoding.js: Added.
(catch):
* Source/JavaScriptCore/bytecode/ExpressionInfo.cpp:
(JSC::ExpressionInfo::Encoder::adjustInstPC):
(JSC::ExpressionInfo::dumpEncodedInfo):
Originally-landed-as: 305413.693@safari-7624-branch (e321c398762a).
rdar://181074668
Canonical link: https://commits.webkit.org/316319@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications