Changeset 284573 in webkit
- Timestamp:
- Oct 20, 2021, 2:45:13 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGIntegerRangeOptimizationPhase.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r284533 r284573 1 2021-10-20 Michael Saboff <msaboff@apple.com> 2 3 Add missing overflow checks to DFGIntegerRangeOptimizationPhase::isEquivalentTo() 4 https://bugs.webkit.org/show_bug.cgi?id=232024 5 6 Reviewed by Tadeu Zagallo. 7 8 Added overflow check before comparing for equality. 9 10 * dfg/DFGIntegerRangeOptimizationPhase.cpp: 11 1 12 2021-10-20 Michael Catanzaro <mcatanzaro@gnome.org> 2 13 -
trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp
r284330 r284573 1 1 /* 2 * Copyright (C) 2015-202 0Apple Inc. All rights reserved.2 * Copyright (C) 2015-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 229 229 return true; 230 230 231 if (m_right->isInt32Constant() && other.m_right->isInt32Constant()) 232 return (m_right->asInt32() + m_offset) == (other.m_right->asInt32() + other.m_offset); 231 if (m_right->isInt32Constant() && other.m_right->isInt32Constant()) { 232 int thisRight = m_right->asInt32(); 233 int otherRight = other.m_right->asInt32(); 234 235 if (sumOverflows<int>(thisRight, m_offset)) 236 return false; 237 if (sumOverflows<int>(otherRight, other.m_offset)) 238 return false; 239 240 return (thisRight + m_offset) == (otherRight + other.m_offset); 241 } 233 242 return false; 234 243 }
Note:
See TracChangeset
for help on using the changeset viewer.