diff options
author | NARUSE, Yui <naruse@airemix.jp> | 2021-03-02 21:50:15 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2021-03-02 21:50:15 +0900 |
commit | 4328f93f1bf08296115172a279e2d85a0ed80122 (patch) | |
tree | 6e19dc84918fd4fa6ada5c01fd41c773c9b7ad69 /version.h | |
parent | 3e67bfe202d6b410375af990ac806f15cb2df762 (diff) |
merge revision(s) 87437326214e4587a41946c8937e11418d983acd: [Backport #17581]
Fix backtrace to not skip frames with iseq without pc
Previously, frames with iseq but no pc were skipped (even before
the refactoring in 3b24b7914c16930bfadc89d6aff6326a51c54295).
Because the entire backtrace was procesed before the refactoring,
this was handled by using later frames instead. However, after
the refactoring, we need to handle those frames or they get
lost.
Keep two iteration counters when iterating, one for the desired
backtrace size (so we generate the desired number of frames), and
one for the actual backtrace size (so we don't process off the end
of the stack). When skipping over an iseq frame with no pc,
decrement the counter for the desired backtrace, so it will
continue to process the expected number of backtrace frames.
Fixes [Bug #17581]
---
test/ruby/test_backtrace.rb | 12 ++++++++++++
vm_backtrace.c | 16 +++++++++-------
2 files changed, 21 insertions(+), 7 deletions(-)
Diffstat (limited to 'version.h')
-rw-r--r-- | version.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12,7 +12,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 46 +#define RUBY_PATCHLEVEL 47 #define RUBY_RELEASE_YEAR 2021 #define RUBY_RELEASE_MONTH 3 |