Skip to content

Commit f5c4eb7

Browse files
authored
jit: disable ASAN for arm64 SIMD helper (#306)
While it would be ideal to disable only the expected buffer over reads or let users add the generated functions to an exception list, this will at least prevent the unexpected crash that ASAN would trigger otherwise by default.
1 parent b43e745 commit f5c4eb7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/pcre2_jit_neon_inc.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ POSSIBILITY OF SUCH DAMAGE.
8282
# endif
8383
# endif
8484

85+
#if (defined(__GNUC__) && __SANITIZE_ADDRESS__) \
86+
|| (defined(__clang__) \
87+
&& ((__clang_major__ == 3 && __clang_minor__ >= 3) || (__clang_major__ > 3)))
88+
__attribute__((no_sanitize_address))
89+
#endif
8590
static sljit_u8* SLJIT_FUNC FF_FUN(sljit_u8 *str_end, sljit_u8 **str_ptr, sljit_uw offs1, sljit_uw offs2, sljit_uw chars)
8691
#undef FF_FUN
8792
{

0 commit comments

Comments
 (0)