[webkit-reviews] review granted: [Bug 227170] Prevent sign-extended casts for 32 bits arch : [Attachment 431781] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jun 19 00:03:19 PDT 2021
Yusuke Suzuki <ysuzuki at apple.com> has granted Mikhail R. Gadelha
<mikhail at igalia.com>'s request for review:
Bug 227170: Prevent sign-extended casts for 32 bits arch
https://bugs.webkit.org/show_bug.cgi?id=227170
Attachment 431781: Patch
https://bugs.webkit.org/attachment.cgi?id=431781&action=review
--- Comment #4 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 431781
--> https://bugs.webkit.org/attachment.cgi?id=431781
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=431781&action=review
r=me with nits
> Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h:190
> + bufferPrintf("0x%" PRIxPTR, reinterpret_cast<uintptr_t>(pc +
immediate));
Using bitwise_cast would be better since it checks whether the start() is the
same size to uintptr_t.
> Source/JavaScriptCore/runtime/JSCell.cpp:295
> + ptrdiff_t cellOffset = cellAddress -
reinterpret_cast<uintptr_t>(foundBlockHandle->start());
Using bitwise_cast would be better since it checks whether the start() is the
same size to uintptr_t.
> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:2799
> + append(Move,
Arg::bigImm(reinterpret_cast<uintptr_t>(&m_tierUp->m_counter)), countdownPtr);
Ditto.
> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:2851
> + append(Move,
Arg::bigImm(reinterpret_cast<uintptr_t>(&m_tierUp->m_counter)), countdownPtr);
Ditto.
> Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:2033
> + Value* countDownLocation = constant(pointerType(),
reinterpret_cast<uintptr_t>(&m_tierUp->m_counter), Origin());
Ditto.
> Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:2083
> + Value* countDownLocation = constant(pointerType(),
reinterpret_cast<uintptr_t>(&m_tierUp->m_counter), origin);
Ditto.
> Source/WTF/wtf/LoggerHelper.h:79
> + return reinterpret_cast<const
void*>((reinterpret_cast<uintptr_t>(parentIdentifier) & parentMask) |
(childIdentifier & maskLowerWord));
Ditto.
More information about the webkit-reviews
mailing list