File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -526,13 +526,20 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
526
526
#if !defined(_Py_FUZZ_ONE ) || defined(_Py_FUZZ_fuzz_sre_compile )
527
527
static int SRE_COMPILE_INITIALIZED = 0 ;
528
528
if (!SRE_COMPILE_INITIALIZED && !init_sre_compile ()) {
529
- PyErr_Print ();
530
- abort ();
529
+ if (!PyErr_ExceptionMatches (PyExc_DeprecationWarning )) {
530
+ PyErr_Print ();
531
+ abort ();
532
+ }
533
+ else {
534
+ PyErr_Clear ();
535
+ }
531
536
} else {
532
537
SRE_COMPILE_INITIALIZED = 1 ;
533
538
}
534
539
535
- rv |= _run_fuzz (data , size , fuzz_sre_compile );
540
+ if (SRE_COMPILE_INITIALIZED ) {
541
+ rv |= _run_fuzz (data , size , fuzz_sre_compile );
542
+ }
536
543
#endif
537
544
#if !defined(_Py_FUZZ_ONE ) || defined(_Py_FUZZ_fuzz_sre_match )
538
545
static int SRE_MATCH_INITIALIZED = 0 ;
You can’t perform that action at this time.
0 commit comments