WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
266505
DFG node flags are erroneously masked off in ArithClz32
https://bugs.webkit.org/show_bug.cgi?id=266505
Summary
DFG node flags are erroneously masked off in ArithClz32
David Degazio
Reported
2023-12-15 14:11:50 PST
rdar://119694893
In the DFG backwards propagation phase, when we modify the flags of an ArithClz32 node, we run the following: flags &= ~(... | ~NodeBytecodePrefersArrayIndex); In other nodes, we mask off bits for propagatable flags that shouldn't be propagated past the current node - for instance, bitwise operations mask off NodeBytecodeUsesAsNumber, since other nodes up the chain will be used as integers in the bitwise op. But here, we are including the negation of NodeBytecodePrefersArrayIndex, and due to the double negative in this statement, this has the effect of masking off all flags other than NodeBytecodePrefersArrayIndex. This looks like a typo, although since the behavior is already to mask off almost all bits in the backwards propagation mask, the only adverse effect is we might propagate NodeBytecodePrefersArrayIndex to the child nodes (unnecessary since we know the Clz32 will always return an int, making the existing PrefersArrayIndex bit redundant, but I can't find anywhere where preferring an array index would cause problems).
Attachments
Add attachment
proposed patch, testcase, etc.
David Degazio
Comment 1
2023-12-15 14:18:05 PST
Pull request:
https://github.com/WebKit/WebKit/pull/21890
EWS
Comment 2
2023-12-19 14:52:49 PST
Committed
272302@main
(552c7a956d0e): <
https://commits.webkit.org/272302@main
> Reviewed commits have been landed. Closing PR #21890 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug