ports/databases/mariadb55-server/files/patch-MDEV-15961
Bernard Spil d7bc97ea5d databases/mariadb55-server: Security update to 5.5.60
- Fix build with aarch64 [1]
 - Remove new ${name}_limits behavior from 11-STABLE [2]

PR:		227628 [1], 227434 [2]
Submitted by:	Naram Qashat <cyberbotx cyberbotx com> [1], 0mp [2]
MFH:		2018Q2
Security:	57aec168-453e-11e8-8777-b499baebfeaf
2018-04-23 19:12:24 +00:00

47 lines
887 B
Text

https://jira.mariadb.org/browse/MDEV-15961
--- mysys/stacktrace.c.orig 2018-01-18 17:10:31 UTC
+++ mysys/stacktrace.c
@@ -34,19 +34,19 @@
#include <execinfo.h>
#endif
+#ifdef __linux__
#define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end)
-
static char *heap_start;
-
-#ifdef HAVE_BSS_START
extern char *__bss_start;
-#endif
+#else
+#define PTR_SANE(p) (p)
+#endif /* __linux */
void my_init_stacktrace()
{
-#ifdef HAVE_BSS_START
+#ifdef __linux__
heap_start = (char*) &__bss_start;
-#endif
+#endif /* __linux__ */
}
#ifdef __linux__
@@ -131,14 +131,14 @@ static int safe_print_str(const char *ad
void my_safe_print_str(const char* val, int max_len)
{
+#ifdef __linux__
char *heap_end;
-#ifdef __linux__
if (!safe_print_str(val, max_len))
return;
-#endif
heap_end= (char*) sbrk(0);
+#endif
if (!PTR_SANE(val))
{