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

Issue 1989803002: Fix UBSan errors (left shift of negative value) (Closed)

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

Description

Fix UBSan errors (left shift of negative value) I've settled on replacing x << n with x * (1 << n); this gets rid of the "left shift of negative value" warning, but will still trigger undefined behavior if the multiplication overflows. It also still looks like a left shift, which is good for the readability of the fixed-point code. (The compiler is smart enough to recognize that the multiplication+shift is just a shift, for both variable and constant shift amounts, so the generated code should not change.) BUG=chromium:603491 Committed: https://crrev.com/64208e55232fba0a81b846091197cc68a431ee77 Cr-Commit-Position: refs/heads/master@{#12845}

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -31 lines) Patch
M webrtc/common_audio/signal_processing/include/signal_processing_library.h View 2 chunks +7 lines, -8 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c View 3 chunks +5 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks.c View 2 chunks +14 lines, -10 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/transform.c View 2 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 13 (6 generated)
kwiberg-webrtc
4 years, 7 months ago (2016-05-18 13:29:10 UTC) #3
tlegrand-webrtc
LGTM
4 years, 7 months ago (2016-05-20 10:39:30 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1989803002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1989803002/20001
4 years, 7 months ago (2016-05-20 11:35:07 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL) android_rel on ...
4 years, 7 months ago (2016-05-20 13:35:34 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1989803002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1989803002/20001
4 years, 7 months ago (2016-05-23 08:24:52 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years, 7 months ago (2016-05-23 10:28:33 UTC) #11
commit-bot: I haz the power
4 years, 7 months ago (2016-05-23 10:28:46 UTC) #13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/64208e55232fba0a81b846091197cc68a431ee77
Cr-Commit-Position: refs/heads/master@{#12845}

Powered by Google App Engine
This is Rietveld 408576698