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

Unified Diff: webrtc/common_audio/signal_processing/filter_ma_fast_q12.c

Issue 2293893002: Add functions to interact with ASan and MSan, and some sample uses (Closed)
Patch Set: Created 4 years, 4 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/common_audio/signal_processing/filter_ma_fast_q12.c
diff --git a/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c b/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c
index f4d9a3d3038cf1480b4cf7cf8fdf3503245a8881..98f5b3cb6d4f2180bbfe621b688b261b8ff141d1 100644
--- a/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c
+++ b/webrtc/common_audio/signal_processing/filter_ma_fast_q12.c
@@ -17,6 +17,8 @@
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/base/sanitizer.h"
+
void WebRtcSpl_FilterMAFastQ12(const int16_t* in_ptr,
int16_t* out_ptr,
const int16_t* B,
@@ -24,6 +26,11 @@ void WebRtcSpl_FilterMAFastQ12(const int16_t* in_ptr,
size_t length)
{
size_t i, j;
+
+ rtc_MsanCheckInitialized(B, sizeof(B[0]), B_length);
+ rtc_MsanCheckInitialized(in_ptr - B_length + 1, sizeof(in_ptr[0]),
+ B_length + length - 1);
kwiberg-webrtc 2016/08/30 19:55:28 This is the sort of rtc_MsanCheckInitialized() cal
hlundin-webrtc 2016/09/01 13:41:35 What?! You don't like functions that use memory "t
kwiberg-webrtc 2016/09/02 07:30:16 Well, as long as you don't document what memory ra
+
for (i = 0; i < length; i++)
{
int32_t o = 0;

Powered by Google App Engine
This is Rietveld 408576698