diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | addr2line.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Sun Mar 16 06:33:35 2014 NARUSE, Yui <naruse@ruby-lang.org> + + * addr2line.c (fill_lines): return address is just after calling + address. Therefore noreturn function with tail call's return + address may be in another function. + Sun Mar 16 05:51:55 2014 Zachary Scott <e@zzak.io> * lib/gserver.rb: [DOC] Fixed typo in example by @stomar [Bug #9543] diff --git a/addr2line.c b/addr2line.c index 5f6aa92104..801c095bf3 100644 --- a/addr2line.c +++ b/addr2line.c @@ -580,7 +580,7 @@ fill_lines(int num_traces, void **traces, char **syms, int check_debuglink, ElfW(Sym) *sym = &symtab[j]; intptr_t saddr = (intptr_t)sym->st_value + lines[i].base_addr; ptrdiff_t d = (intptr_t)traces[i] - saddr; - if (d < 0 || d > (ptrdiff_t)sym->st_size) continue; + if (d <= 0 || d > (ptrdiff_t)sym->st_size) continue; lines[i].sname = strtab + sym->st_name; lines[i].saddr = saddr; } |