Issue #13526 has been updated by Eregon (Benoit Daloze).


Note that the original example only works if it's a file under the current directory invoked like "ruby test.rb",
Otherwise `"#{File.dirname($0)}/#{$0}"` does not refer to the current file.
I fixed it in r60854, to use `File.expand_path(__FILE__)`.

The bug still happens on 2.4.1 whether the file exists or not, so it seems fine to test the case where the file does exist.
The bug seems caused by the interaction of autoload threads and the shutdown triggered by the main thread.

----------------------------------------
Bug #13526: Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
https://bugs.ruby-lang.org/issues/13526#change-67855

* Author: vlad-leonov (Vladislav Leonov)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: DONE, 2.4: DONE
----------------------------------------
see attached log

---Files--------------------------------
segv.log (245 KB)
bug13526.log (13.7 KB)
bug13526_dp.patch (2.72 KB)
bug13526_dp.log (12.5 KB)


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

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>