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

Issue 1406423004: Workaround for false positive -Wmaybe-uninitialized being triggered on some compilers (Closed)

Created:
5 years, 2 months ago by msniegocki
Modified:
5 years, 2 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, peah-webrtc, kwiberg-webrtc, tlegrand-webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Workaround for false positive -Wmaybe-uninitialized being triggered on some compilers Some toolchains (in this case referring to a g++ 4.9, or "arm-linux- androideabi-g++ (GCC) 4.9 20140827 (prerelease)" according to my --version, from the Android NDK r10e-rc4 and potentially with custom patches; others may be affected as well) fail to prove that myVec in WebRtcIsac_CorrelateInterVec is never used uninitialized. This is likely due to the compiler thinking the assignment in line 468 might not happen. Changing the loop condition in line 466 to rowCntr < SOME_CONSTANT also helps, suggesting that the compiler can't infer that there are only 2 values interVecDim can have at that point, and neither of them are 0. Of course, this is not an acceptable fix, as it changes behaviour. This seems to be a compiler bug, or at least an issue with its heuristics. However, we can't really change toolchains at the moment, and ultimately this change improves support for certain older compilers. BUG= Committed: https://crrev.com/5460f9b81dc9bd232fa856347729f120159ae168 Cr-Commit-Position: refs/heads/master@{#10337}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M webrtc/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (3 generated)
msniegocki
5 years, 2 months ago (2015-10-19 14:46:52 UTC) #3
turaj
lgtm
5 years, 2 months ago (2015-10-19 16:05:38 UTC) #4
kwiberg-webrtc
lgtm
5 years, 2 months ago (2015-10-20 09:41:46 UTC) #5
minyue-webrtc
lgtm
5 years, 2 months ago (2015-10-20 10:34:51 UTC) #6
hlundin-webrtc
lgtm
5 years, 2 months ago (2015-10-20 10:45:20 UTC) #7
hlundin-webrtc
On 2015/10/20 10:45:20, hlundin-webrtc wrote: > lgtm Thanks for your contribution! I'm going to commit ...
5 years, 2 months ago (2015-10-20 11:07:22 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1406423004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1406423004/1
5 years, 2 months ago (2015-10-20 11:07:30 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 2 months ago (2015-10-20 12:45:06 UTC) #11
commit-bot: I haz the power
5 years, 2 months ago (2015-10-20 12:45:16 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/5460f9b81dc9bd232fa856347729f120159ae168
Cr-Commit-Position: refs/heads/master@{#10337}

Powered by Google App Engine
This is Rietveld 408576698