1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
Ivo Anjo 649bfbe00d Fix rb_profile_frames output includes dummy main thread frame
The `rb_profile_frames` API did not skip the two dummy frames that
each thread has at its beginning. This was unlike `backtrace_each` and
`rb_ec_parcial_backtrace_object`, which do skip them.

This does not seem to be a problem for non-main thread frames,
because both `VM_FRAME_RUBYFRAME_P(cfp)` and
`rb_vm_frame_method_entry(cfp)` are NULL for them.

BUT, on the main thread `VM_FRAME_RUBYFRAME_P(cfp)` was true
and thus the dummy thread was still included in the output of
`rb_profile_frames`.

I've now made `rb_profile_frames` skip this extra frame (like
`backtrace_each` and friends), as well as add a test that asserts
the size and contents of `rb_profile_frames`.

Fixes [Bug #18907] (<https://bugs.ruby-lang.org/issues/18907>)
2022-07-26 10:43:44 +09:00
..
-ext- Fix rb_profile_frames output includes dummy main thread frame 2022-07-26 10:43:44 +09:00
base64
benchmark
bigdecimal
cgi
coverage
csv
date
did_you_mean
digest
drb
dtrace
erb
error_highlight
etc
excludes
fiber
fiddle
fileutils
fixtures/fake_sorted_set_gem
io
irb
json
lib
logger
mkmf
monitor
net
nkf
objspace
open-uri
openssl
optparse
ostruct
pathname
psych
racc
rdoc
readline
reline [ruby/reline] Rename dialog_pointer_* to dialog_highlight_* 2022-07-22 23:34:49 +09:00
resolv
rinda
ripper
ruby Wait the test thread to sleep 2022-07-25 18:50:08 +09:00
rubygems [rubygems/rubygems] Bump rb-sys 2022-07-26 04:56:40 +09:00
socket
stringio
strscan
syslog
uri
win32ole
yaml
zlib
runner.rb
test_abbrev.rb
test_delegate.rb
test_extlibs.rb
test_find.rb
test_forwardable.rb
test_getoptlong.rb
test_ipaddr.rb
test_mutex_m.rb
test_observer.rb
test_open3.rb
test_pp.rb
test_prettyprint.rb
test_pstore.rb
test_pty.rb
test_rbconfig.rb
test_securerandom.rb
test_set.rb
test_shellwords.rb
test_singleton.rb
test_sorted_set.rb
test_syslog.rb
test_tempfile.rb
test_time.rb
test_timeout.rb
test_tmpdir.rb
test_trick.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb