mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
regex: Handle JIT errors more explicitly
This commit is contained in:
parent
fe1c2628d5
commit
5e76cde5ff
@ -471,6 +471,7 @@ match_error (gint errcode)
|
|||||||
/* not used by pcre2_match() */
|
/* not used by pcre2_match() */
|
||||||
break;
|
break;
|
||||||
case PCRE2_ERROR_MATCHLIMIT:
|
case PCRE2_ERROR_MATCHLIMIT:
|
||||||
|
case PCRE2_ERROR_JIT_STACKLIMIT:
|
||||||
return _("backtracking limit reached");
|
return _("backtracking limit reached");
|
||||||
case PCRE2_ERROR_CALLOUT:
|
case PCRE2_ERROR_CALLOUT:
|
||||||
/* callouts are not implemented */
|
/* callouts are not implemented */
|
||||||
@ -912,8 +913,8 @@ enable_jit_with_match_options (GRegex *regex,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
|
g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
|
||||||
"but request for JIT support had unexpectedly failed. "
|
"but request for JIT support had unexpectedly failed (error %d). "
|
||||||
"Falling back to interpretive code.");
|
"Falling back to interpretive code.", retval);
|
||||||
regex->jit_status = JIT_STATUS_DISABLED;
|
regex->jit_status = JIT_STATUS_DISABLED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user