Closed Bug 998167 Opened 6 years ago Closed 6 years ago
Fix signed integer overflow in Evaluate
The code in EvaluateConstantOperands for folding an Lsh operator uses a signed left shift. This invokes undefined behavior if the computation overflows.
This patch changes Lsh to use an unsigned shift instead of a signed shift to fix the undefined behavior, and also tidies up the Ursh case to look similar.
Assignee: nobody → sunfish
Attachment #8408725 - Flags: review?(nicolas.b.pierron)
Attachment #8408725 - Flags: review?(nicolas.b.pierron) → review+
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.