[ruby-core:94216] [Ruby master Feature#16090] RUBY_ON_BUG envval to debug

From: ko1@...
Date: 2019-08-09 08:43:23 UTC
List: ruby-core #94216
Issue #16090 has been reported by ko1 (Koichi Sasada).

----------------------------------------
Feature #16090: RUBY_ON_BUG envval to debug
https://bugs.ruby-lang.org/issues/16090

* Author: ko1 (Koichi Sasada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
How about to introduce `RUBY_ON_BUG` environment variable which specify the command launched at `rb_bug()`?

`RUBY_ON_BUG='gdb -p' ruby ...`

In this case, `gdb -p [PID]` is invoked when `rb_bug()` is called.
after that, we can spy the interpreter with gdb.

https://github.com/ruby/ruby/pull/2331

On my patch, it is limited to RUBY_DEVEL build.

# Security risk

I'm not a professional about security, but it can introduce new security risk.
Comments are welcome.
This is why I made a ticket.

Thanks,
Koichi



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

In This Thread

Prev Next