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

Issue 2500953003: Avoid left-shifting negative values in a number of places (Closed)

Created:
4 years, 1 month ago by hlundin-webrtc
Modified:
4 years, 1 month ago
Reviewers:
ivoc, kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org, Andrew MacDonald, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, peah-webrtc, minyue-webrtc, aluebs-webrtc, bjornv1
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Avoid left-shifting negative values in a number of places This is undefined behavior, according to specification. BUG=chromium:661133 Committed: https://crrev.com/79dfdadbc861a56596a42ba9f40c8bcbf30e4d75 Cr-Commit-Position: refs/heads/master@{#15078}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -20 lines) Patch
M webrtc/common_audio/signal_processing/levinson_durbin.c View 9 chunks +17 lines, -17 lines 0 comments Download
M webrtc/common_audio/signal_processing/vector_scaling_operations.c View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/expand.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (8 generated)
hlundin-webrtc
PTAL
4 years, 1 month ago (2016-11-15 07:21:22 UTC) #2
hlundin-webrtc
Ivo, PTAL.
4 years, 1 month ago (2016-11-15 08:21:24 UTC) #8
ivoc
LGTM, but I think that right-shifts of negative numbers (happens many times in these files) ...
4 years, 1 month ago (2016-11-15 09:39:08 UTC) #9
hlundin-webrtc
On 2016/11/15 09:39:08, ivoc wrote: > LGTM, but I think that right-shifts of negative numbers ...
4 years, 1 month ago (2016-11-15 09:44:04 UTC) #10
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/2500953003/1
4 years, 1 month ago (2016-11-15 09:44:19 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-15 09:45:55 UTC) #13
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/79dfdadbc861a56596a42ba9f40c8bcbf30e4d75 Cr-Commit-Position: refs/heads/master@{#15078}
4 years, 1 month ago (2016-11-15 09:46:05 UTC) #15
kwiberg-webrtc
On 2016/11/15 09:44:04, hlundin-webrtc wrote: > On 2016/11/15 09:39:08, ivoc wrote: > > LGTM, but ...
4 years, 1 month ago (2016-11-15 13:26:46 UTC) #16
ivoc
4 years, 1 month ago (2016-11-15 13:41:42 UTC) #17
Message was sent while issue was closed.
On 2016/11/15 13:26:46, kwiberg-webrtc wrote:
> On 2016/11/15 09:44:04, hlundin-webrtc wrote:
> > On 2016/11/15 09:39:08, ivoc wrote:
> > > LGTM, but I think that right-shifts of negative numbers (happens many
times
> in
> > > these files) may also be undefined behavior.
> > 
> > Acknowledged.
> 
> I think that's implementation-defined, not undefined. And every 2's complement
> implementation (i.e., pretty much all of them) will probably do the obvious
> thing.

Would it be a good idea to make a unit test for this?

Powered by Google App Engine
This is Rietveld 408576698