diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-11-10 09:50:30 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-11-10 09:50:30 +0200 |
commit | 91a7e9eb1ef9bfba6a1da5bca4a9b8c58a94c245 (patch) | |
tree | 5ba5f3931c1dd69bd609c37502951be9129c0a5e /mysys/my_addr_resolve.c | |
parent | c18a57ab2a796637a563b15daa3b5981123cfe8f (diff) | |
parent | 038cd5195612084542704f181695358e3b8959a8 (diff) | |
download | mariadb-git-91a7e9eb1ef9bfba6a1da5bca4a9b8c58a94c245.tar.gz |
Merge 10.8 into 10.9
Diffstat (limited to 'mysys/my_addr_resolve.c')
-rw-r--r-- | mysys/my_addr_resolve.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mysys/my_addr_resolve.c b/mysys/my_addr_resolve.c index 444a47bb7c5..2d4385f4684 100644 --- a/mysys/my_addr_resolve.c +++ b/mysys/my_addr_resolve.c @@ -202,7 +202,7 @@ int start_addr2line_fork(const char *binary_path) close(out[0]); close(out[1]); execlp("addr2line", "addr2line", "-C", "-f", "-e", binary_path, NULL); - exit(1); + _exit(1); } close(in[0]); @@ -319,12 +319,20 @@ int my_addr_resolve(void *ptr, my_addr_loc *loc) /* Save result for future comparisons. */ strnmov(addr2line_binary, info.dli_fname, sizeof(addr2line_binary)); +#ifdef _AIX + /* + info.dli_fbase is a char on AIX and casting it doesn't fool gcc. + leave backtracing broken on AIX until a real solution can be found. + */ + addr_offset= NULL; +#else /* Check if we should use info.dli_fbase as an offset or not for the base program. This is depending on if the compilation is done with PIE or not. */ - addr_offset= (void*) info.dli_fbase; + addr_offset= info.dli_fbase; +#endif #ifndef __PIE__ if (strcmp(info.dli_fname, my_progname) == 0 && addr_resolve((void*) my_addr_resolve, loc) == 0 && |