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

Issue 2014033002: Fix UBSan errors (signed integer overflow) (Closed)

Created:
4 years, 7 months ago by kwiberg-webrtc
Modified:
4 years, 6 months ago
Reviewers:
tlegrand-webrtc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, peah-webrtc, minyue-webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@bug601787-2
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fix UBSan errors (signed integer overflow) WebRtcSpl_CrossCorrelation and WebRtcSpl_DotProductWithScale compute the int32 sum of pairwise products from two int16 arrays. So as to avoid overflow (which could otherwise happen when as little as two products were summed), the products are right-shifted by an amount specified by the caller. This CL changes WebRtcIlbcfix_MyCorr and WebRtcIlbcfix_Smooth to give sufficient right-shift amounts, instead of ones that may be too small and cause overflow. BUG=chromium:601787 Committed: https://crrev.com/a10740239dd0f40f54d65288055e128496e2da3f Cr-Commit-Position: refs/heads/master@{#13066}

Patch Set 1 : #

Total comments: 6

Patch Set 2 : logic fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -21 lines) Patch
M webrtc/modules/audio_coding/codecs/ilbc/my_corr.c View 1 chunk +14 lines, -13 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/smooth.c View 1 2 chunks +11 lines, -8 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 16 (4 generated)
kwiberg-webrtc
4 years, 7 months ago (2016-05-25 23:49:47 UTC) #3
tlegrand-webrtc
This CL seem to actually change the behavior. I wonder if a suitable test can ...
4 years, 7 months ago (2016-05-26 09:39:44 UTC) #4
kwiberg-webrtc
On 2016/05/26 09:39:44, tlegrand-webrtc wrote: > This CL seem to actually change the behavior. I ...
4 years, 7 months ago (2016-05-26 11:35:09 UTC) #5
kwiberg-webrtc
https://codereview.webrtc.org/2014033002/diff/20001/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c File webrtc/modules/audio_coding/codecs/ilbc/my_corr.c (right): https://codereview.webrtc.org/2014033002/diff/20001/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c#newcode45 webrtc/modules/audio_coding/codecs/ilbc/my_corr.c:45: right_shift = 0; On 2016/05/26 09:39:44, tlegrand-webrtc wrote: > ...
4 years, 7 months ago (2016-05-26 11:43:55 UTC) #6
tlegrand-webrtc
Comments inline. https://codereview.webrtc.org/2014033002/diff/20001/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c File webrtc/modules/audio_coding/codecs/ilbc/my_corr.c (right): https://codereview.webrtc.org/2014033002/diff/20001/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c#newcode45 webrtc/modules/audio_coding/codecs/ilbc/my_corr.c:45: right_shift = 0; On 2016/05/26 11:43:55, kwiberg-webrtc ...
4 years, 7 months ago (2016-05-26 12:18:21 UTC) #7
kwiberg-webrtc
https://codereview.webrtc.org/2014033002/diff/20001/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c File webrtc/modules/audio_coding/codecs/ilbc/my_corr.c (right): https://codereview.webrtc.org/2014033002/diff/20001/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c#newcode45 webrtc/modules/audio_coding/codecs/ilbc/my_corr.c:45: right_shift = 0; On 2016/05/26 12:18:21, tlegrand-webrtc wrote: > ...
4 years, 7 months ago (2016-05-26 13:52:10 UTC) #8
kwiberg-webrtc
Uploaded a new patch set with a small logic fix: we actually do three dot ...
4 years, 7 months ago (2016-05-26 13:58:28 UTC) #9
kwiberg-webrtc
As a sanity check, I tried replacing the computed right shift with 30 in both ...
4 years, 6 months ago (2016-06-01 13:46:57 UTC) #10
tlegrand-webrtc
On 2016/06/01 13:46:57, kwiberg-webrtc wrote: > As a sanity check, I tried replacing the computed ...
4 years, 6 months ago (2016-06-03 06:22:05 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2014033002/40001
4 years, 6 months ago (2016-06-08 11:39:21 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years, 6 months ago (2016-06-08 12:24:43 UTC) #14
commit-bot: I haz the power
4 years, 6 months ago (2016-06-08 12:24:51 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/a10740239dd0f40f54d65288055e128496e2da3f
Cr-Commit-Position: refs/heads/master@{#13066}

Powered by Google App Engine
This is Rietveld 408576698