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

Unified Diff: webrtc/modules/audio_processing/aecm/aecm_core_c.cc

Issue 3009123002: Move UBSan warnings from a blacklist to the source (Closed)
Patch Set: Address review comments Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/aecm/aecm_core_c.cc
diff --git a/webrtc/modules/audio_processing/aecm/aecm_core_c.cc b/webrtc/modules/audio_processing/aecm/aecm_core_c.cc
index 32f26569f86618cac35b1fa5779f51605c0d28e7..bf26277e3859e20fab79810bd46e276dd14748cd 100644
--- a/webrtc/modules/audio_processing/aecm/aecm_core_c.cc
+++ b/webrtc/modules/audio_processing/aecm/aecm_core_c.cc
@@ -24,6 +24,7 @@ extern "C" {
}
#include "webrtc/rtc_base/checks.h"
+#include "webrtc/rtc_base/sanitizer.h"
#include "webrtc/typedefs.h"
// Square root of Hanning window in Q14.
@@ -276,11 +277,12 @@ static int TimeToFrequencyDomain(AecmCore* aecm,
return time_signal_scaling;
}
-int WebRtcAecm_ProcessBlock(AecmCore* aecm,
- const int16_t* farend,
- const int16_t* nearendNoisy,
- const int16_t* nearendClean,
- int16_t* output) {
+int RTC_NO_SANITIZE("signed-integer-overflow") // bugs.webrtc.org/8200
+WebRtcAecm_ProcessBlock(AecmCore* aecm,
+ const int16_t* farend,
+ const int16_t* nearendNoisy,
+ const int16_t* nearendClean,
+ int16_t* output) {
int i;
uint32_t xfaSum;
@@ -453,6 +455,7 @@ int WebRtcAecm_ProcessBlock(AecmCore* aecm,
// How much can we shift right to preserve resolution
tmp32no1 = echoEst32[i] - aecm->echoFilt[i];
aecm->echoFilt[i] += (tmp32no1 * 50) >> 8;
+ // UBSan: 72293096 * 50 cannot be represented in type 'int'
zeros32 = WebRtcSpl_NormW32(aecm->echoFilt[i]) + 1;
zeros16 = WebRtcSpl_NormW16(supGain) + 1;
« no previous file with comments | « webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc ('k') | webrtc/rtc_base/ipaddress_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698