kenhys pushed to groonga (f21). "Add a patch to fix crash bug in standalone mode"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon Mar 30 10:02:17 UTC 2015
>From ceae63b75d15a8af5a29686d3e5e86ad54c0c655 Mon Sep 17 00:00:00 2001
From: HAYASHI Kentaro <kenhys at gmail.com>
Date: Mon, 30 Mar 2015 09:43:25 +0000
Subject: Add a patch to fix crash bug in standalone mode
diff --git a/fix-crash-by-missing-libedit-initialization.patch b/fix-crash-by-missing-libedit-initialization.patch
new file mode 100644
index 0000000..cf50694
--- /dev/null
+++ b/fix-crash-by-missing-libedit-initialization.patch
@@ -0,0 +1,34 @@
+diff -ur groonga-5.0.1.orig/src/groonga.c groonga-5.0.1/src/groonga.c
+--- groonga-5.0.1.orig/src/groonga.c 2015-03-24 18:18:35.586093947 +0900
++++ groonga-5.0.1/src/groonga.c 2015-03-30 18:12:03.064053676 +0900
+@@ -2139,7 +2139,8 @@
+ ACTION_ERROR
+ };
+
+-#define ACTION_MASK (0x0f)
++#define ACTION_MASK (0x0f)
++#define MODE_MASK (0xf0)
+ #define FLAG_MODE_ALONE (1 << 4)
+ #define FLAG_MODE_CLIENT (1 << 5)
+ #define FLAG_MODE_DAEMON (1 << 6)
+@@ -2759,6 +2760,10 @@
+ return EXIT_FAILURE;
+ }
+
++ if ((flags & MODE_MASK) == 0) {
++ flags |= FLAG_MODE_ALONE;
++ }
++
+ if (port_arg) {
+ const char * const end = port_arg + strlen(port_arg);
+ const char *rest = NULL;
+@@ -2908,7 +2913,8 @@
+ }
+ }
+
+- if ((flags & FLAG_MODE_CLIENT) && !batchmode) {
++ if ((flags & (FLAG_MODE_ALONE | FLAG_MODE_CLIENT)) &&
++ !batchmode) {
+ need_line_editor = GRN_TRUE;
+ }
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/groonga.git/commit/?h=f21&id=ceae63b75d15a8af5a29686d3e5e86ad54c0c655
More information about the scm-commits
mailing list