1b5975d6bSopenharmony_ciFrom 2c2e059cd354a9020ce9188e58e3ab0683008d08 Mon Sep 17 00:00:00 2001
2b5975d6bSopenharmony_ciFrom: Aleksei Rybalkin <aleksei@rybalkin.org>
3b5975d6bSopenharmony_ciDate: Fri, 22 Jul 2022 20:27:04 +0200
4b5975d6bSopenharmony_ciSubject: [PATCH] gregex: use g_debug instead of g_warning in case JIT is not
5b5975d6bSopenharmony_ci available
6b5975d6bSopenharmony_ci
7b5975d6bSopenharmony_ciIn case JIT is not available in pcre2 we printed warning about it. This
8b5975d6bSopenharmony_ciwarning broke tests on systems which don't have JIT support in pcre2
9b5975d6bSopenharmony_ci(e.g. macos).
10b5975d6bSopenharmony_ci
11b5975d6bSopenharmony_ciConflict:NA
12b5975d6bSopenharmony_ciReference:https://gitlab.gnome.org/GNOME/glib/-/commit/2c2e059cd354a9020ce9188e58e3ab0683008d08
13b5975d6bSopenharmony_ci
14b5975d6bSopenharmony_ci---
15b5975d6bSopenharmony_ci glib/gregex.c | 18 +++++++++---------
16b5975d6bSopenharmony_ci 1 file changed, 9 insertions(+), 9 deletions(-)
17b5975d6bSopenharmony_ci
18b5975d6bSopenharmony_cidiff --git a/glib/gregex.c b/glib/gregex.c
19b5975d6bSopenharmony_ciindex cf9ce23e8d..6741d2479f 100644
20b5975d6bSopenharmony_ci--- a/glib/gregex.c
21b5975d6bSopenharmony_ci+++ b/glib/gregex.c
22b5975d6bSopenharmony_ci@@ -855,21 +855,21 @@ enable_jit_with_match_options (GRegex *regex,
23b5975d6bSopenharmony_ci       regex->jit_options = new_jit_options;
24b5975d6bSopenharmony_ci       break;
25b5975d6bSopenharmony_ci     case PCRE2_ERROR_NOMEMORY:
26b5975d6bSopenharmony_ci-      g_warning ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
27b5975d6bSopenharmony_ci-                 "but JIT was unable to allocate executable memory for the "
28b5975d6bSopenharmony_ci-                 "compiler. Falling back to interpretive code.");
29b5975d6bSopenharmony_ci+      g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
30b5975d6bSopenharmony_ci+               "but JIT was unable to allocate executable memory for the "
31b5975d6bSopenharmony_ci+               "compiler. Falling back to interpretive code.");
32b5975d6bSopenharmony_ci       regex->jit_status = JIT_STATUS_DISABLED;
33b5975d6bSopenharmony_ci       break;
34b5975d6bSopenharmony_ci     case PCRE2_ERROR_JIT_BADOPTION:
35b5975d6bSopenharmony_ci-      g_warning ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
36b5975d6bSopenharmony_ci-                 "but JIT support is not available. Falling back to "
37b5975d6bSopenharmony_ci-                 "interpretive code.");
38b5975d6bSopenharmony_ci+      g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
39b5975d6bSopenharmony_ci+               "but JIT support is not available. Falling back to "
40b5975d6bSopenharmony_ci+               "interpretive code.");
41b5975d6bSopenharmony_ci       regex->jit_status = JIT_STATUS_DISABLED;
42b5975d6bSopenharmony_ci       break;
43b5975d6bSopenharmony_ci     default:
44b5975d6bSopenharmony_ci-      g_warning ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
45b5975d6bSopenharmony_ci-                 "but request for JIT support had unexpectedly failed. "
46b5975d6bSopenharmony_ci-                 "Falling back to interpretive code.");
47b5975d6bSopenharmony_ci+      g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
48b5975d6bSopenharmony_ci+               "but request for JIT support had unexpectedly failed. "
49b5975d6bSopenharmony_ci+               "Falling back to interpretive code.");
50b5975d6bSopenharmony_ci       regex->jit_status = JIT_STATUS_DISABLED;
51b5975d6bSopenharmony_ci       break;
52b5975d6bSopenharmony_ci     }
53b5975d6bSopenharmony_ci-- 
54b5975d6bSopenharmony_ciGitLab
55b5975d6bSopenharmony_ci
56