View | Details | Raw Unified | Return to bug 230682 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 lines)
Lines 7-14 Link Here
7
7
8
COMMENT=	Multithreaded SQL database (client)
8
COMMENT=	Multithreaded SQL database (client)
9
9
10
BROKEN_aarch64=		fails to link: missing sbrk
11
12
MASTERDIR=	${.CURDIR}/../mariadb103-server
10
MASTERDIR=	${.CURDIR}/../mariadb103-server
13
11
14
FILESDIR=	${.CURDIR}/files
12
FILESDIR=	${.CURDIR}/files
(-)files/patch-mysys_stacktrace.c (+47 lines)
Line 0 Link Here
1
--- mysys/stacktrace.c.orig	2018-07-02 07:34:11 UTC
2
+++ mysys/stacktrace.c
3
@@ -34,19 +34,19 @@
4
 #include <execinfo.h>
5
 #endif
6
 
7
+#ifdef __linux__
8
 #define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end)
9
-
10
 static char *heap_start;
11
-
12
-#if(defined HAVE_BSS_START) && !(defined __linux__)
13
 extern char *__bss_start;
14
-#endif
15
+#else
16
+#define PTR_SANE(p) (p)
17
+#endif /* __linux */
18
 
19
 void my_init_stacktrace()
20
 {
21
-#if(defined HAVE_BSS_START) && !(defined __linux__)
22
+#ifdef __linux__
23
   heap_start = (char*) &__bss_start;
24
-#endif
25
+#endif /* __linux__ */
26
 }
27
 
28
 #ifdef __linux__
29
@@ -149,15 +149,16 @@ static int safe_print_str(const char *ad
30
 
31
 int my_safe_print_str(const char* val, size_t max_len)
32
 {
33
+#ifdef __linux__
34
+/* Only needed by the linux version of PTR_SANE */
35
   char *heap_end;
36
 
37
-#ifdef __linux__
38
   // Try and make use of /proc filesystem to safely print memory contents.
39
   if (!safe_print_str(val, max_len))
40
     return 0;
41
-#endif
42
 
43
   heap_end= (char*) sbrk(0);
44
+#endif
45
 
46
   if (!PTR_SANE(val))
47
   {

Return to bug 230682