Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Issue 2729573002: Multiply in 64 bits to avoid overflow (Closed)

Created:
3 years, 9 months ago by kwiberg-webrtc
Modified:
3 years, 9 months ago
Reviewers:
hlundin-webrtc
CC:
webrtc-reviews_webrtc.org, AleBzk, peah-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, kwiberg-webrtc, minyue-webrtc
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Multiply in 64 bits to avoid overflow A fuzzer run caused the operands of this multiplication to be 512 and 5000000, resulting in a product about 20% too large for int32_t. So change this from a 16x32->32 to a 16x32->64 multiplication. Since we right shift by 2 at the end, the end result will still fit in int32_t. I also had to fix a few follow-on add/sub overflows found by the same fuzzer input once the multiplication was fixed. I chose to saturate these, since it wasn't just an intermediate value that overflowed. BUG=chromium:693868 Review-Url: https://codereview.webrtc.org/2729573002 Cr-Commit-Position: refs/heads/master@{#17003} Committed: https://chromium.googlesource.com/external/webrtc/+/3a2c803dc341a2bc266effb07df9863c14a7aeaa

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -8 lines) Patch
M webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c View 5 chunks +18 lines, -8 lines 0 comments Download

Messages

Total messages: 15 (8 generated)
kwiberg-webrtc
3 years, 9 months ago (2017-03-01 14:23:45 UTC) #4
hlundin-webrtc
lgtm
3 years, 9 months ago (2017-03-03 13:22:59 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2729573002/1
3 years, 9 months ago (2017-03-03 13:24:36 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/external/webrtc/+/3a2c803dc341a2bc266effb07df9863c14a7aeaa
3 years, 9 months ago (2017-03-03 13:44:53 UTC) #12
tommi
A revert of this CL (patchset #1 id:1) has been created in https://codereview.webrtc.org/2740423003/ by tommi@webrtc.org. ...
3 years, 9 months ago (2017-03-11 16:00:50 UTC) #13
tommi
On 2017/03/11 16:00:50, tommi (webrtc) wrote: > A revert of this CL (patchset #1 id:1) ...
3 years, 9 months ago (2017-03-11 16:02:58 UTC) #14
hlundin-webrtc
3 years, 9 months ago (2017-03-14 08:49:06 UTC) #15
Message was sent while issue was closed.
On 2017/03/11 16:02:58, tommi (webrtc) wrote:
> On 2017/03/11 16:00:50, tommi (webrtc) wrote:
> > A revert of this CL (patchset #1 id:1) has been created in
> > https://codereview.webrtc.org/2740423003/ by mailto:tommi@webrtc.org.
> > 
> > The reason for reverting is: Looks like this caused isac_fix_test to start
> > failing:
> >
>
https://build.chromium.org/p/client.webrtc.perf/builders/Linux%20Trusty?numbu...
> >
>
https://build.chromium.org/p/client.webrtc.perf/builders/Linux%20Trusty/build....
> 
> I decided not to revert, since the Chromium issue that this cl fixed, has been
> verified.
> Can you take a look at the failing test?

The test should be good again with https://codereview.webrtc.org/2746903002.

Powered by Google App Engine
This is Rietveld 408576698