diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-01-16 22:57:52 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-01-19 16:11:34 +0200 |
commit | 26e5f9dda13efad33e867742ea4e42e479b51b2b (patch) | |
tree | 022d92626b90a9253c37770f1d2dfc5d7a02a4de /configure.cmake | |
parent | a7a4519a40c58947796c6d9b2e4e58acc18aeef8 (diff) | |
download | mariadb-git-26e5f9dda13efad33e867742ea4e42e479b51b2b.tar.gz |
MDEV-14229: Stack trace is not resolved for shared objects
Resolving a stacktrace including functions in dynamic libraries requires
us to look inside the libraries for the symbols. Addr2line needs to be
started with the correct binary for each address on the stack. To do this,
figure out which library it is using dladdr, then if the addr2line
binary was started with a different binary, fork it again with the
correct one.
We only have one addr2line process running at any point during the
stacktrace resolving step. The maximum number of forks for addr2line should
generally be around 6.
One for server stacktrace code, one for plugin code, one when going back
into server code, one for pthread library, one for libc, one for the
_start function in the server. More can come up if plugin calls server
function which goes back to a plugin, etc.
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index 470fb719fb8..43f8f71390d 100644 --- a/configure.cmake +++ b/configure.cmake @@ -346,6 +346,7 @@ CHECK_FUNCTION_EXISTS (ftruncate HAVE_FTRUNCATE) CHECK_FUNCTION_EXISTS (getline HAVE_GETLINE) CHECK_FUNCTION_EXISTS (compress HAVE_COMPRESS) CHECK_FUNCTION_EXISTS (crypt HAVE_CRYPT) +CHECK_FUNCTION_EXISTS (dladdr HAVE_DLADDR) CHECK_FUNCTION_EXISTS (dlerror HAVE_DLERROR) CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN) CHECK_FUNCTION_EXISTS (fchmod HAVE_FCHMOD) |