Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.1.17
-
None
-
Alpine Linux, armhf, 3.4-stable, gcc 5.3.0, musl libc.
Description
10.1.14 built fine but when upgrading to 10.1.17 for the security fixes it fails with:
|
|
[ 75%] Building C object storage/maria/CMakeFiles/aria.dir/ma_control_file.c.o
|
[ 75%] Building C object storage/maria/CMakeFiles/aria.dir/ma_loghandler.c.o
|
[ 75%] Building CXX object storage/mroonga/CMakeFiles/mroonga.dir/lib/mrn_match_escalation_threshold_scope.cpp.o
|
[ 75%] Building CXX object storage/mroonga/CMakeFiles/mroonga.dir/lib/mrn_path_mapper.cpp.o
|
/home/buildozer/aports/main/mariadb/src/mariadb-10.1.17/sql/signal_handler.cc: In function 'void handle_fatal_signal(int)':
|
/home/buildozer/aports/main/mariadb/src/mariadb-10.1.17/sql/signal_handler.cc:285:21: error: 'thd' was not declared in this scope
|
my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
|
^
|
libmysqld/CMakeFiles/sql_embedded.dir/build.make:590: recipe for target 'libmysqld/CMakeFiles/sql_embedded.dir/__/sql/signal_handler.cc.o' failed
|
make[2]: *** [libmysqld/CMakeFiles/sql_embedded.dir/__/sql/signal_handler.cc.o] Error 1
|
CMakeFiles/Makefile2:10207: recipe for target 'libmysqld/CMakeFiles/sql_embedded.dir/all' failed
|
make[1]: *** [libmysqld/CMakeFiles/sql_embedded.dir/all] Error 2
|
make[1]: *** Waiting for unfinished jobs....
|
This happens only on armhf. x86 and x86_64 builds just fine.
Attachments
Issue Links
- includes
-
MDEV-10531 Compilation issue introduced by MDEV-9127
-
- Closed
-
Seems it was introduced here:
commit 7d4a7d8c5861e6587176052ea71c30ab12a49084
Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
Date: Mon May 30 22:33:34 2016 +0300
[MDEV-9127] Crash reporter often fails to show the query that crashed
Addreses are not necessarily between heap_start && heap_end. Malloc
calls using mmap can place pointers outside these bounds. In this case,
we'll warn the user that the query pointer is potentially invalid.
However, we'll attempt to print the data anyway after we're done
printing everything else.
Probably just needs a patch like this:
diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc
index 9dd3e53..f72eb67 100644
--- a/sql/signal_handler.cc
+++ b/sql/signal_handler.cc
@@ -64,13 +64,13 @@ extern "C" sig_handler handle_fatal_signal(int sig)
struct tm tm;
#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;
+#endif
if (segfaulted)
{
@@ -276,6 +276,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
"\"mlockall\" bugs.\n");
}
+#ifdef HAVE_STACKTRACE
if (print_invalid_query_pointer)
{
my_safe_printf_stderr(
@@ -285,6 +286,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
my_safe_printf_stderr("\n\n");
}
+#endif
#ifdef HAVE_WRITE_CORE
if (test_flags & TEST_CORE_ON_SIGNAL)