aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-08-09 22:13:10 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2016-08-09 22:13:10 +0000
commita1f44199605dba0b530b8f435a032c8d183a1476 (patch)
treeabb0ac66885611e5abe62ddeef05e698b1c929e5 /main/mariadb
parent7cc8e9775b2ac057396105d645d0b28cc9cc3578 (diff)
downloadaports-a1f44199605dba0b530b8f435a032c8d183a1476.tar.bz2
aports-a1f44199605dba0b530b8f435a032c8d183a1476.tar.xz
main/mariadb: fix build on arm
Diffstat (limited to 'main/mariadb')
-rw-r--r--main/mariadb/0001-Revert-MDEV-9127-Crash-reporter-often-fails-to-show-.patch149
-rw-r--r--main/mariadb/APKBUILD10
2 files changed, 156 insertions, 3 deletions
diff --git a/main/mariadb/0001-Revert-MDEV-9127-Crash-reporter-often-fails-to-show-.patch b/main/mariadb/0001-Revert-MDEV-9127-Crash-reporter-often-fails-to-show-.patch
new file mode 100644
index 0000000000..935bb81d4d
--- /dev/null
+++ b/main/mariadb/0001-Revert-MDEV-9127-Crash-reporter-often-fails-to-show-.patch
@@ -0,0 +1,149 @@
+From dfa91fac7ecddd8b2c4c6459cc69396f5ec7e0a5 Mon Sep 17 00:00:00 2001
+From: Carlo Landmeter <clandmeter@gmail.com>
+Date: Tue, 9 Aug 2016 21:48:38 +0200
+Subject: [PATCH] Revert "[MDEV-9127] Crash reporter often fails to show the
+ query that crashed"
+
+This reverts commit 7d4a7d8c5861e6587176052ea71c30ab12a49084.
+---
+ include/my_stacktrace.h | 2 +-
+ mysys/stacktrace.c | 30 ++++--------------------------
+ sql/signal_handler.cc | 23 +----------------------
+ 3 files changed, 6 insertions(+), 49 deletions(-)
+
+diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h
+index fad6e53..fb2525e 100644
+--- a/include/my_stacktrace.h
++++ b/include/my_stacktrace.h
+@@ -45,7 +45,7 @@ C_MODE_START
+ #if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)
+ void my_init_stacktrace();
+ void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack);
+-int my_safe_print_str(const char* val, int max_len);
++void my_safe_print_str(const char* val, int max_len);
+ void my_write_core(int sig);
+ #if BACKTRACE_DEMANGLE
+ char *my_demangle(const char *mangled_name, int *status);
+diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c
+index 3956592..4cc767f 100644
+--- a/mysys/stacktrace.c
++++ b/mysys/stacktrace.c
+@@ -129,32 +129,13 @@ static int safe_print_str(const char *addr, int max_len)
+
+ #endif
+
+-/*
+- Attempt to print a char * pointer as a string.
+-
+- SYNOPSIS
+- Prints either until the end of string ('\0'), or max_len characters have
+- been printed.
+-
+- RETURN VALUE
+- 0 Pointer was within the heap address space.
+- The string was printed fully, or until the end of the heap address space.
+- 1 Pointer is outside the heap address space. Printed as invalid.
+-
+- NOTE
+- On some systems, we can have valid pointers outside the heap address space.
+- This is through the use of mmap inside malloc calls. When this function
+- returns 1, it does not mean 100% that the pointer is corrupted.
+-*/
+-
+-int my_safe_print_str(const char* val, int max_len)
++void my_safe_print_str(const char* val, int max_len)
+ {
+ char *heap_end;
+
+ #ifdef __linux__
+- // Try and make use of /proc filesystem to safely print memory contents.
+ if (!safe_print_str(val, max_len))
+- return 0;
++ return;
+ #endif
+
+ heap_end= (char*) sbrk(0);
+@@ -162,14 +143,12 @@ int my_safe_print_str(const char* val, int max_len)
+ if (!PTR_SANE(val))
+ {
+ my_safe_printf_stderr("%s", "is an invalid pointer");
+- return 1;
++ return;
+ }
+
+ for (; max_len && PTR_SANE(val) && *val; --max_len)
+ my_write_stderr((val++), 1);
+ my_safe_printf_stderr("%s", "\n");
+-
+- return 0;
+ }
+
+ #if defined(HAVE_PRINTSTACK)
+@@ -748,7 +727,7 @@ void my_write_core(int unused)
+ }
+
+
+-int my_safe_print_str(const char *val, int len)
++void my_safe_print_str(const char *val, int len)
+ {
+ __try
+ {
+@@ -758,7 +737,6 @@ int my_safe_print_str(const char *val, int len)
+ {
+ my_safe_printf_stderr("%s", "is an invalid string pointer");
+ }
+- return 0;
+ }
+ #endif /*__WIN__*/
+
+diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc
+index 9dd3e53..9077b24 100644
+--- a/sql/signal_handler.cc
++++ b/sql/signal_handler.cc
+@@ -65,12 +65,6 @@ extern "C" sig_handler handle_fatal_signal(int sig)
+ #ifdef HAVE_STACKTRACE
+ THD *thd;
+ #endif
+- /*
+- This flag remembers if the query pointer was found invalid.
+- We will try and print the query at the end of the signal handler, in case
+- we're wrong.
+- */
+- bool print_invalid_query_pointer= false;
+
+ if (segfaulted)
+ {
+@@ -207,12 +201,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
+ "Some pointers may be invalid and cause the dump to abort.\n");
+
+ my_safe_printf_stderr("Query (%p): ", thd->query());
+- if (my_safe_print_str(thd->query(), MY_MIN(65536U, thd->query_length())))
+- {
+- // Query was found invalid. We will try to print it at the end.
+- print_invalid_query_pointer= true;
+- }
+-
++ my_safe_print_str(thd->query(), MY_MIN(65536U, thd->query_length()));
+ my_safe_printf_stderr("\nConnection ID (thread ID): %lu\n",
+ (ulong) thd->thread_id);
+ my_safe_printf_stderr("Status: %s\n\n", kreason);
+@@ -276,16 +265,6 @@ extern "C" sig_handler handle_fatal_signal(int sig)
+ "\"mlockall\" bugs.\n");
+ }
+
+- if (print_invalid_query_pointer)
+- {
+- my_safe_printf_stderr(
+- "\nWe think the query pointer is invalid, but we will try "
+- "to print it anyway. \n"
+- "Query: ");
+- my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
+- my_safe_printf_stderr("\n\n");
+- }
+-
+ #ifdef HAVE_WRITE_CORE
+ if (test_flags & TEST_CORE_ON_SIGNAL)
+ {
+--
+2.9.1
+
diff --git a/main/mariadb/APKBUILD b/main/mariadb/APKBUILD
index 6591d1e389..5be2798fcb 100644
--- a/main/mariadb/APKBUILD
+++ b/main/mariadb/APKBUILD
@@ -20,6 +20,7 @@ source="https://downloads.mariadb.org/interstitial/mariadb-$pkgver/source/mariad
$pkgname.initd
fix-mysql-install-db-path.patch
fix-ucontext-check.patch
+ 0001-Revert-MDEV-9127-Crash-reporter-often-fails-to-show-.patch
"
subpackages="$pkgname-doc $pkgname-dev $pkgname-common
@@ -183,12 +184,15 @@ _compat_bench() { _compat mysql-bench mariadb-client; }
md5sums="2a26b8d6560693cfc51031e76522cb78 mariadb-10.1.16.tar.gz
195f8bf24dfdbc5aa7ccd969a1b1283f mariadb.initd
b233fb7015a9659f5b825cd8010d2b52 fix-mysql-install-db-path.patch
-96b7247f919bf4e1de13a9d0ce7ef515 fix-ucontext-check.patch"
+96b7247f919bf4e1de13a9d0ce7ef515 fix-ucontext-check.patch
+d0121427fa42aa35aa23a73cebe36b0b 0001-Revert-MDEV-9127-Crash-reporter-often-fails-to-show-.patch"
sha256sums="67cb35c62cc5d4cf48d7b614c0c7a9245a762ca23d4e588e15c616c102e64393 mariadb-10.1.16.tar.gz
c37aa7c150c07a3ac478a6fd1b478b425c17ac412f9ba4f49b8a635edb6ed542 mariadb.initd
0f4d97cc9d512fc43cdb4b2f2a6dc16b37cb72a18c7d7a3e23e11a116d119904 fix-mysql-install-db-path.patch
-3d9a12bf04fcf215567b6a395fe83fb6528602baf4283d42181bd73f93b5f538 fix-ucontext-check.patch"
+3d9a12bf04fcf215567b6a395fe83fb6528602baf4283d42181bd73f93b5f538 fix-ucontext-check.patch
+a32d531beb7c2b716842675d0cfdede0865412f4ddd9cef4e032624821d65eea 0001-Revert-MDEV-9127-Crash-reporter-often-fails-to-show-.patch"
sha512sums="4bf9a0b9c964f2526ecb48a0b7863c39a43ca3a6d3685b6397f79a4004d0f065108ea2367116d53da42dd70e42a4b4761bf4ead79c0483e0ba65915f58a6dd73 mariadb-10.1.16.tar.gz
06751768cb00d2e433655635c38d267ef25084a5830ff40e719ac579223c7192dc34b43f919ab6faf480094632327511cbd22456064dde2d04dc15648b9e3b9f mariadb.initd
f85e96490de56aa4e6115f931bf256bef4e1b93cadbe4ac947d6abdc03072bf2d0872e0268ae37cd98edf13538ece73e9f8b6efa8133bab23168a825c5066ab1 fix-mysql-install-db-path.patch
-82fa93411483f5d1b57d978087a891bcab6a011e45c2d79b08d28718f5717994b423fc81d2170dad2fe65303153ac29655a81ce5039e73e37cebb159392a86cf fix-ucontext-check.patch"
+82fa93411483f5d1b57d978087a891bcab6a011e45c2d79b08d28718f5717994b423fc81d2170dad2fe65303153ac29655a81ce5039e73e37cebb159392a86cf fix-ucontext-check.patch
+ce51e596108707fae6674c522ea9aea15559f0609f7076e787708c0d04a6491d0ed9226f6c31c270626046af628b32f803733843f6e888cfd0599e05e800ba24 0001-Revert-MDEV-9127-Crash-reporter-often-fails-to-show-.patch"