summaryrefslogtreecommitdiff
path: root/include/my_stacktrace.h
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-11-26 19:59:10 -0200
committerDavi Arnaut <davi.arnaut@oracle.com>2010-11-26 19:59:10 -0200
commit0008e06489cc3c346ee4ab62f89f20ac404f9472 (patch)
tree60dd85b3738059765520bb243a6626f1b7ec5a85 /include/my_stacktrace.h
parenta8680a58a1364a2ee5ca19d8a980c7eb5dc7f602 (diff)
downloadmariadb-git-0008e06489cc3c346ee4ab62f89f20ac404f9472.tar.gz
Bug#51817: incorrect assumption: thd->query at 0x2ab2a8360360 is an invalid pointer
The problem is that the logic which checks if a pointer is valid relies on a poor heuristic based on the start and end addresses of the data segment and heap. Apart from miscalculating the heap bounds, this approach also suffers from the fact that memory can come from places other than the heap. See Bug#58528 for a more detailed explanation. On Linux, the solution is to access the process's memory through /proc/self/task/<tid>/mem, which allows for retrieving the contents of pages within the virtual address space of the calling process. If a address range is not mapped, a input/output error is returned.
Diffstat (limited to 'include/my_stacktrace.h')
-rw-r--r--include/my_stacktrace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h
index 9250fd4579e..b64d5d798a5 100644
--- a/include/my_stacktrace.h
+++ b/include/my_stacktrace.h
@@ -47,7 +47,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);
-void my_safe_print_str(const char* name, 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);