Move UBSan warnings from a blacklist to the source
This is done to make UBSan testing more convenient in integration with projects using WebRTC Some blacklist entries were obsolete so don't need a replacement Also fix one of the warnings (thanks, kwiberg@) BUG=webrtc:8189, webrtc:5486, webrtc:5491 Review-Url: https://codereview.webrtc.org/3009123002 Cr-Commit-Position: refs/heads/master@{#19682}
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_tables.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h"
|
||||
#include "webrtc/rtc_base/sanitizer.h"
|
||||
#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
|
||||
#include "webrtc/test/gtest.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
@ -19,8 +20,9 @@
|
||||
class FilterBanksTest : public testing::Test {
|
||||
protected:
|
||||
// Pass a function pointer to the Tester function.
|
||||
void CalculateResidualEnergyTester(AllpassFilter2FixDec16
|
||||
AllpassFilter2FixDec16Function) {
|
||||
void RTC_NO_SANITIZE("signed-integer-overflow") // bugs.webrtc.org/5513
|
||||
CalculateResidualEnergyTester(AllpassFilter2FixDec16
|
||||
AllpassFilter2FixDec16Function) {
|
||||
const int kSamples = QLOOKAHEAD;
|
||||
const int kState = 2;
|
||||
int16_t data_ch1[kSamples] = {0};
|
||||
@ -41,6 +43,7 @@ class FilterBanksTest : public testing::Test {
|
||||
sign *= -1;
|
||||
data_ch1[i] = sign * WEBRTC_SPL_WORD32_MAX / (i * i + 1);
|
||||
data_ch2[i] = sign * WEBRTC_SPL_WORD32_MIN / (i * i + 1);
|
||||
// UBSan: -1 * -2147483648 cannot be represented in type 'int'
|
||||
};
|
||||
|
||||
AllpassFilter2FixDec16Function(data_ch1,
|
||||
|
||||
Reference in New Issue
Block a user