ruby/tool
Peter Zhu 3e09822407 Fix incorrect line numbers in GC hook
If the previous instruction is not a leaf instruction, then the PC was
incremented before the instruction was ran (meaning the currently
executing instruction is actually the previous instruction), so we
should not increment the PC otherwise we will calculate the source
line for the next instruction.

This bug can be reproduced in the following script:

```
require "objspace"

ObjectSpace.trace_object_allocations_start
a =

  1.0 / 0.0
p [ObjectSpace.allocation_sourceline(a), ObjectSpace.allocation_sourcefile(a)]
```

Which outputs: [4, "test.rb"]

This is incorrect because the object was allocated on line 10 and not
line 4. The behaviour is correct when we use a leaf instruction (e.g.
if we replaced `1.0 / 0.0` with `"hello"`), then the output is:
[10, "test.rb"].

[Bug #19456]
2023-02-24 14:10:09 -05:00
..
annocheck Add `make test-annocheck` to detect security issues. 2022-05-16 10:10:16 +02:00
bundler Merge RubyGems/Bundler master 2022-12-26 15:09:21 +09:00
dummy-rake-compiler/rake Bundle rbs 1.7.0.beta.5 2021-11-09 03:32:46 +09:00
lib Refine exception messages when git failed 2023-02-22 10:23:05 +09:00
m4 tool/m4/ruby_wasm_tools.m4: force passing WASI_SDK_PATH when building for wasi 2022-12-21 11:19:23 +09:00
mjit MJIT: Cancel all on disastrous situations (#7019) 2022-12-24 01:13:40 -08:00
releng gen-mail.rb: support markdown file path 2022-02-18 21:44:22 +09:00
ruby_vm Fix incorrect line numbers in GC hook 2023-02-24 14:10:09 -05:00
test Fix the case trailer without newline 2022-12-22 00:34:21 +09:00
asm_parse.rb
bisect.sh
build-transcode
checksum.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-11-21 22:16:49 +09:00
ci_functions.sh
colors
darwin-ar Silence dozens of useless warnings from `nm` on macOS 2023-01-31 19:42:01 +09:00
darwin-cc
disable_ipv6.sh .cirrus.yml: Add Cirrus CI for Arm64 tests. 2021-09-22 09:01:43 +02:00
downloader.rb downloader.rb: Select less components path 2022-12-03 02:03:23 +09:00
enc-case-folding.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-11-21 22:16:49 +09:00
enc-emoji-citrus-gen.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-11-21 22:16:49 +09:00
enc-emoji4unicode.rb
enc-unicode.rb reserved_word: just use gperf 3.1 declaration 2022-09-21 11:44:09 +09:00
eval.rb
expand-config.rb expand-config.rb: search revision.h to extract release date 2022-12-20 17:40:19 +09:00
extlibs.rb tool/extlibs.rb: Use Exception#message for older rubies 2022-06-17 18:13:19 -04:00
fake.rb Use $(bindir) for path to executable in mkmf 2022-08-04 16:29:22 +09:00
fetch-bundled_gems.rb Just ignore empty lines in bundled_gems file [ci skip] 2023-01-10 23:31:04 +09:00
file2lastrev.rb Avoid overwriting revision.h when .git doesn't exist (#6915) 2022-12-12 23:34:30 -08:00
format-release tag's prefix is "v" 2021-12-25 22:19:02 +09:00
gen-github-release.rb Enhancement github releases generator 2023-02-10 09:26:12 +09:00
gen-mailmap.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-11-21 22:16:49 +09:00
gen_dummy_probes.rb
gen_ruby_tapset.rb
generic_erb.rb tool/generic_erb.rb: Add a hack to prevent "unused variable" warnings 2022-11-18 14:56:55 +09:00
git-refresh
gperf.sed [ruby/date] Constify gperf-generated table 2022-05-24 17:23:42 +09:00
id2token.rb Process token IDs from id.def without id.h 2022-09-08 18:22:47 +09:00
ifchange
insns2vm.rb
install-sh
intern_ids.rb Added intern_ids.rb 2021-07-27 15:40:27 +09:00
leaked-globals YJIT: Fix shared/static library symbol leaks 2023-01-27 12:28:09 -05:00
ln_sr.rb Quiet if the target is already linked the same source 2022-09-20 12:54:08 +09:00
make-snapshot Removed svn feature from make-snapshot 2023-02-08 15:36:32 +09:00
make_hgraph.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-11-21 22:16:49 +09:00
mdoc2man.rb
merger.rb
mjit_archflag.sh
mjit_tabs.rb
mk_builtin_loader.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-12-01 02:28:49 +09:00
mkconfig.rb mkconfig: Map `includedir` only for system ruby 2023-01-31 06:33:16 +09:00
mkrunnable.rb [Bug #18623] Link only existing excutables to make runnable [ci skip] 2022-12-06 17:52:58 +09:00
node_name.rb
outdate-bundled-gems.rb Match ABI versions precisely 2022-12-13 22:07:42 -08:00
parse.rb
prereq.status
probes_to_wiki.rb
rbinstall.rb Make installation messages verbose a little [ci skip] 2023-01-18 23:55:25 +09:00
rbs_skip_tests Skip rbs Encoding#replicate test 2023-01-11 13:41:41 +01:00
rbuninstall.rb
redmine-backporter.rb fix to work with the case default issue is used 2023-02-01 22:49:54 +09:00
release.sh
rmdirs
run-gcov.rb
run-lcov.rb
runruby.rb tool/runruby.rb: remove LD_PRELOAD-like env-var options from runruby.rb 2022-12-05 17:24:17 +09:00
search-cgvars.rb
strip-rdoc.rb tool/strip-rdoc.rb: optimize 2021-09-10 20:00:06 +09:00
sync_default_gems.rb Fixed a typo 2023-01-10 13:07:36 +09:00
test-annocheck.sh Add `make test-annocheck` to detect security issues. 2022-05-16 10:10:16 +02:00
test-bundled-gems.rb Set up RBS_SKIP_TESTS (#6862) 2022-12-21 22:11:51 +09:00
test-coverage.rb Filter spec directory for code coverage 2023-01-26 14:05:01 +09:00
transcode-tblgen.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-12-01 02:28:49 +09:00
transform_mjit_header.rb Fix a typo [ci skip] 2022-08-20 18:36:52 -07:00
travis_retry.sh
travis_wait.sh
update-NEWS-gemlist.rb [DOC] Add gem lists to NEWS.md automatically 2023-01-13 20:34:45 +09:00
update-NEWS-refs.rb [DOC] tool/update-NEWS-refs.rb: Align footnotes 2022-12-21 20:48:51 +09:00
update-bundled_gems.rb Strip trailing spaces [ci skip] 2022-10-24 18:38:09 +09:00
update-deps Fix detection of compiler_wd in tool/update-deps 2023-02-21 10:57:28 -05:00
vtlh.rb
wasm-clangw [wasm] add asyncify based setjmp, fiber, register scan emulation 2022-01-19 11:19:06 +09:00
ytab.sed