From 028727c20ca43f1a56bad010354837e238e30024 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 30 Aug 2018 15:27:17 +0200 Subject: ASAN: Disable SSE4.1 code in qstricmp because of heap-buffer-overflow Although it is safe to slightly overread a string (provided it doesn't cross page boundaries), ASAN is extremely picky about this kind of behavior. So, do not run with this vectorized code when ASAN is enabled. Task-number: QTBUG-70269 Change-Id: I2b59b524d608afec8985227285feab55158d7247 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Thiago Macieira --- src/corelib/tools/qbytearray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 10e9b22161..b53a60b9bf 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -432,7 +432,7 @@ int qstricmp(const char *str1, const char *str2) return int(Incomplete); }; -#ifdef __SSE4_1__ +#if defined(__SSE4_1__) && !(defined(__SANITIZE_ADDRESS__) || QT_HAS_FEATURE(address_sanitizer)) enum { PageSize = 4096, PageMask = PageSize - 1 }; const __m128i zero = _mm_setzero_si128(); forever { -- cgit v1.2.3