[ruby-core:95884] [Ruby master Bug#16177] Some `*.rb` files on builddir cause Segmentation fault

[email protected]
Newsgroups gmane.comp.lang.ruby.core
Message-ID <redmine.journal-82720.20191119080144.7b56f956771ef92c@ruby-lang.org>
Issue #16177 has been updated by ko1 (Koichi Sasada).


I fixed this issue, but no test. can anyone write it?

----------------------------------------
Bug #16177: Some `*.rb` files on builddir cause Segmentation fault
https://bugs.ruby-lang.org/issues/16177#change-82720

* Author: znz (Kazuhiro NISHIYAMA)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-09-24T02:50:38Z master 2366c68116) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
How to reproduce:

1. Create dummy files by `./miniruby -e '%w[a b foo bar test zzz].each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}'` 
2. Run `ruby/test_autoload.rb` like `make test-all TESTS='ruby/test_autoload.rb'`

Error log from raw logs:

```
2019-09-24T09:48:24.3773590Z   2) Failure:
2019-09-24T09:48:24.3773760Z TestAutoload#test_autoload_same_file [/Users/runner/runners/2.158.0/work/ruby/ruby/test/ruby/test_autoload.rb:332]:
2019-09-24T09:48:24.3773930Z pid 39572 killed by SIGABRT (signal 6)
2019-09-24T09:48:24.3774450Z | #<Thread:0x00007f8851176ac0@-:9 run> terminated with exception (report_on_exception is true):
2019-09-24T09:48:24.3775010Z | /Users/runner/runners/2.158.0/work/ruby/ruby/b.rb:1:in `<top (required)>': do not load b.rb (RuntimeError)
2019-09-24T09:48:24.3775480Z | 	from -:9:in `require'
2019-09-24T09:48:24.3775910Z | 	from -:9:in `block in <main>'
2019-09-24T09:48:24.3776390Z | -:10: [BUG] Segmentation fault at 0x0000000000000019
```

attached full raw logs of https://github.com/ruby/ruby/pull/2482/checks?check_run_id=233890903#step:11:1 


---Files--------------------------------
36.txt (195 KB)
bug-in-docker.txt (14 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.