diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-15 22:15:30 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-15 22:15:30 +0000 |
commit | 356644685e5f27df9c2dfdacfdff4cb1d7383136 (patch) | |
tree | 909014115bbf85785f94661c6d1e19f97bc385ba | |
parent | cfab6e0f15d8b005f3a23b0ae7687bea25b1e075 (diff) |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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; } |