Issue #14756 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED to 2.3: REQUIRED, 2.4: DONE, 2.5: REQUIRED

ruby_2_4 r64147 merged revision(s) 63417.

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

* Author: yui-knk (Kaneko Yuichiro)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-05-13 trunk 63413) [x86_64-linux]
* Backport: 2.3: REQUIRED, 2.4: DONE, 2.5: REQUIRED
----------------------------------------
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>