|
|
884a19 |
From 99c354431703a4408f0208e3f2b06a9da81937f2 Mon Sep 17 00:00:00 2001
|
|
|
884a19 |
From: Andreas Schneider <asn@samba.org>
|
|
|
884a19 |
Date: Wed, 7 Nov 2018 14:32:29 +0100
|
|
|
884a19 |
Subject: [PATCH] lib:util: Fix DEBUGCLASS pointer initializiation
|
|
|
884a19 |
|
|
|
884a19 |
This fixes a segfault in pyglue:
|
|
|
884a19 |
|
|
|
884a19 |
==10142== Process terminating with default action of signal 11 (SIGSEGV)
|
|
|
884a19 |
==10142== Bad permissions for mapped region at address 0x6F00A20
|
|
|
884a19 |
==10142== at 0x6F1074B: py_set_debug_level (pyglue.c:165)
|
|
|
884a19 |
|
|
|
884a19 |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13679
|
|
|
884a19 |
|
|
|
884a19 |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
884a19 |
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
884a19 |
(cherry picked from commit 71ef09c1afdbf967b829cb66b33c3a5cb1c18ba0)
|
|
|
884a19 |
---
|
|
|
884a19 |
lib/util/debug.c | 4 ++--
|
|
|
884a19 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
884a19 |
|
|
|
884a19 |
diff --git a/lib/util/debug.c b/lib/util/debug.c
|
|
|
884a19 |
index d41e0f99c77..847ec1f0a0c 100644
|
|
|
884a19 |
--- a/lib/util/debug.c
|
|
|
884a19 |
+++ b/lib/util/debug.c
|
|
|
884a19 |
@@ -557,10 +557,10 @@ static const char *default_classname_table[] = {
|
|
|
884a19 |
* This is to allow reading of DEBUGLEVEL_CLASS before the debug
|
|
|
884a19 |
* system has been initialized.
|
|
|
884a19 |
*/
|
|
|
884a19 |
-static const int debug_class_list_initial[ARRAY_SIZE(default_classname_table)];
|
|
|
884a19 |
+static int debug_class_list_initial[ARRAY_SIZE(default_classname_table)];
|
|
|
884a19 |
|
|
|
884a19 |
static size_t debug_num_classes = 0;
|
|
|
884a19 |
-int *DEBUGLEVEL_CLASS = discard_const_p(int, debug_class_list_initial);
|
|
|
884a19 |
+int *DEBUGLEVEL_CLASS = debug_class_list_initial;
|
|
|
884a19 |
|
|
|
884a19 |
|
|
|
884a19 |
/* -------------------------------------------------------------------------- **
|
|
|
884a19 |
--
|
|
|
884a19 |
2.19.1
|
|
|
884a19 |
|