mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
gh-104051: fix crash in test_xxtestfuzz with -We (#104052)
This commit is contained in:
parent
163034515a
commit
81fc135f26
1 changed files with 10 additions and 3 deletions
|
|
@ -526,13 +526,20 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|||
#if !defined(_Py_FUZZ_ONE) || defined(_Py_FUZZ_fuzz_sre_compile)
|
||||
static int SRE_COMPILE_INITIALIZED = 0;
|
||||
if (!SRE_COMPILE_INITIALIZED && !init_sre_compile()) {
|
||||
PyErr_Print();
|
||||
abort();
|
||||
if (!PyErr_ExceptionMatches(PyExc_DeprecationWarning)) {
|
||||
PyErr_Print();
|
||||
abort();
|
||||
}
|
||||
else {
|
||||
PyErr_Clear();
|
||||
}
|
||||
} else {
|
||||
SRE_COMPILE_INITIALIZED = 1;
|
||||
}
|
||||
|
||||
rv |= _run_fuzz(data, size, fuzz_sre_compile);
|
||||
if (SRE_COMPILE_INITIALIZED) {
|
||||
rv |= _run_fuzz(data, size, fuzz_sre_compile);
|
||||
}
|
||||
#endif
|
||||
#if !defined(_Py_FUZZ_ONE) || defined(_Py_FUZZ_fuzz_sre_match)
|
||||
static int SRE_MATCH_INITIALIZED = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue