diff --git a/src/pcre2_fuzzsupport.c b/src/pcre2_fuzzsupport.c index 8fba81502..421ff3358 100644 --- a/src/pcre2_fuzzsupport.c +++ b/src/pcre2_fuzzsupport.c @@ -23,6 +23,7 @@ Further updates March 2024 by PH #include #define STACK_SIZE_MB 256 +#define JIT_SIZE_LIMIT (500 * 1024) #ifndef PCRE2_CODE_UNIT_WIDTH #define PCRE2_CODE_UNIT_WIDTH 8 @@ -439,7 +440,7 @@ for (int i = 0; i < 2; i++) #ifdef SUPPORT_JIT int jit_ret = -1; - if (((struct pcre2_real_code *)code)->blocksize <= 1024 * 1024) + if (((struct pcre2_real_code *)code)->blocksize <= JIT_SIZE_LIMIT) { #ifdef STANDALONE printf("Calling JIT compile\n"); @@ -452,8 +453,9 @@ for (int i = 0; i < 2; i++) else { #ifdef STANDALONE - printf("Not calling JIT: compiled pattern is too long (%ld bytes)\n", - ((struct pcre2_real_code *)code)->blocksize); + printf("Not calling JIT: compiled pattern is too long " + "(%ld bytes; limit=%d)\n", + ((struct pcre2_real_code *)code)->blocksize, JIT_SIZE_LIMIT); #endif } #endif /* SUPPORT_JIT */