diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2008-12-19 08:47:28 -0200 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2008-12-19 08:47:28 -0200 |
commit | b4c40ac240c224f7a56be8486dcb6c34ec45b79b (patch) | |
tree | 54295a7764dd37b87c3f91b2787c0ec78db1c18a /extra | |
parent | 8f1ce01cd274dda2e8ffcbf8697f5a6e27d9d9e6 (diff) | |
download | mariadb-git-b4c40ac240c224f7a56be8486dcb6c34ec45b79b.tar.gz |
Bug#41612: resolve_stack_dump does not decode 5.1 stack trace
resolve_stack_dump is not able to decode a stack trace produced
by glibc's backtrace() functions. The problem is that the stack
trace addresses are printed between brackets and the utility is
not able to ignore the brackets.
The solution is to modify resolve_stack_dump so it can recognize
stack trace addresses surrounded by brackets. e.g. [0xdeadbeef].
extra/resolve_stack_dump.c:
Skip to after a bracket if one is present in the input.
Diffstat (limited to 'extra')
-rw-r--r-- | extra/resolve_stack_dump.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c index 5606c17ecf3..447d63890bd 100644 --- a/extra/resolve_stack_dump.c +++ b/extra/resolve_stack_dump.c @@ -290,7 +290,8 @@ static void do_resolve() char buf[1024], *p; while (fgets(buf, sizeof(buf), fp_dump)) { - p = buf; + /* skip bracket */ + p= (p= strchr(buf, '[')) ? p+1 : buf; /* skip space */ while (my_isspace(&my_charset_latin1,*p)) ++p; |