Issue #14756 has been reported by yui-knk (Kaneko Yuichiro).

----------------------------------------
Bug #14756: `Exception` may cause SEGV when `#backtrace` returns a string
https://bugs.ruby-lang.org/issues/14756

* Author: yui-knk (Kaneko Yuichiro)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-05-13 trunk 63413) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
This code causes SEGV, because `print_backtrace` expects second argument to be an array but a string is given.

```ruby
class Exception
  def backtrace
    "backtrace"
  end
end

"".a
```

Also in ruby 2.3.7, 2.4.4, 2.5.1.



-- 
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>