Skip to content

Commit

Permalink
jit: disable ASAN for arm64 SIMD helper
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
carenas committed Oct 6, 2023
1 parent 2fef163 commit 16670ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pcre2_jit_neon_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ POSSIBILITY OF SUCH DAMAGE.
# endif
# endif

#if (defined(__GNUC__) && __SANITIZE_ADDRESS__) \
|| (defined(__clang__) \
&& ((__clang_major__ == 3 && __clang_minor__ >= 3) || (__clang_major__ > 3))
__attribute__((no_sanitize_address))
#endif
static sljit_u8* SLJIT_FUNC FF_FUN(sljit_u8 *str_end, sljit_u8 **str_ptr, sljit_uw offs1, sljit_uw offs2, sljit_uw chars)
#undef FF_FUN
{
Expand Down

0 comments on commit 16670ab

Please sign in to comment.