[Webkit-unassigned] [Bug 205945] New: Instruction.h: Multiplication result converted to larger type
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 8 11:46:37 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=205945
Bug ID: 205945
Summary: Instruction.h: Multiplication result converted to
larger type
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: msaboff at apple.com
Summary:
Instruction.h: Multiplication result converted to larger type: Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'.
template<typename Traits = JSOpcodeTraits>
size_t size() const
{
auto sizeShiftAmount = this->sizeShiftAmount<Traits>();
auto prefixSize = sizeShiftAmount ? 1 : 0;
auto operandSize = 1 << sizeShiftAmount;
size_t sizeOfBytecode = 1;
return sizeOfBytecode + (Traits::opcodeLengths[opcodeID<Traits>()] - 1) * operandSize + prefixSize;
Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'.
}
fix: Change operandSize to size_t.
--
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/20200108/5440201e/attachment.htm>
More information about the webkit-unassigned
mailing list