[glib/wip/3v1n0/regex-pcre2-flags-fixes: 11/14] regex: Handle JIT errors more explicitly
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/3v1n0/regex-pcre2-flags-fixes: 11/14] regex: Handle JIT errors more explicitly
- Date: Fri, 9 Sep 2022 16:56:22 +0000 (UTC)
commit b31bd8ee57a05160b9d76eaf9ef18072344100dd
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed Sep 7 14:18:14 2022 +0200
regex: Handle JIT errors more explicitly
glib/gregex.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/glib/gregex.c b/glib/gregex.c
index 7d403ad53d..fe7473e628 100644
--- a/glib/gregex.c
+++ b/glib/gregex.c
@@ -471,6 +471,7 @@ match_error (gint errcode)
/* not used by pcre2_match() */
break;
case PCRE2_ERROR_MATCHLIMIT:
+ case PCRE2_ERROR_JIT_STACKLIMIT:
return _("backtracking limit reached");
case PCRE2_ERROR_CALLOUT:
/* callouts are not implemented */
@@ -912,8 +913,8 @@ enable_jit_with_match_options (GRegex *regex,
break;
default:
g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
- "but request for JIT support had unexpectedly failed. "
- "Falling back to interpretive code.");
+ "but request for JIT support had unexpectedly failed (error %d). "
+ "Falling back to interpretive code.", retval);
regex->jit_status = JIT_STATUS_DISABLED;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]