* [ruby-core:94216] [Ruby master Feature#16090] RUBY_ON_BUG envval to debug
[not found] <redmine.issue-16090.20190809084323@ruby-lang.org>
@ 2019-08-09 8:43 ` ko1
2019-08-09 10:04 ` [ruby-core:94217] " shevegen
2019-08-15 4:49 ` [ruby-core:94365] " ko1
2 siblings, 0 replies; 3+ messages in thread
From: ko1 @ 2019-08-09 8:43 UTC (permalink / raw)
To: ruby-core
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:94217] [Ruby master Feature#16090] RUBY_ON_BUG envval to debug
[not found] <redmine.issue-16090.20190809084323@ruby-lang.org>
2019-08-09 8:43 ` [ruby-core:94216] [Ruby master Feature#16090] RUBY_ON_BUG envval to debug ko1
@ 2019-08-09 10:04 ` shevegen
2019-08-15 4:49 ` [ruby-core:94365] " ko1
2 siblings, 0 replies; 3+ messages in thread
From: shevegen @ 2019-08-09 10:04 UTC (permalink / raw)
To: ruby-core
Issue #16090 has been updated by shevegen (Robert A. Heiler).
In general I think this is fine (if we don't forget to document it :) ).
It would give people a way to influence the behaviour there, if they need to,
e. g. the example you gave via using "gdb -p". So this is a convenience
feature mostly, the way I see it.
I have two comments, though. The first one you wrote yourself, security issues.
I am not sure what/if security-related issues can arise, so I am not really
qualified to comment. It may help if we could put specifics into this, e. g.
what might be a real issue here (I really don't know).
The other part is the name; I understand the prefix "RUBY_", this is fine
IMO. Makes sense to assume that those prefixed with "RUBY_" should refer
to the programming language ruby.
The part "ON_BUG" is a bit strange. I understand that you refer to the
function rb_bug() (in C I guess). But I still find the name a bit strange;
to be "ON_BUG" implies some conditional such as "on bug, do this". But I
don't have an alternative suggestion and any name could be re-considered
at a later time; or it is not so important anyway, since this is only for
debugging. So I think the functionality itself is fine.
If this is approved and added, I would recommend to also describe the
assumed use cases for it, e. g. "gdb -p" and whether other debuggers can
be used too. Describing these use cases may be helpful for a later time
when the software ecosystem may be different to e. g. 2019.
----------------------------------------
Feature #16090: RUBY_ON_BUG envval to debug
https://bugs.ruby-lang.org/issues/16090#change-80516
* 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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:94365] [Ruby master Feature#16090] RUBY_ON_BUG envval to debug
[not found] <redmine.issue-16090.20190809084323@ruby-lang.org>
2019-08-09 8:43 ` [ruby-core:94216] [Ruby master Feature#16090] RUBY_ON_BUG envval to debug ko1
2019-08-09 10:04 ` [ruby-core:94217] " shevegen
@ 2019-08-15 4:49 ` ko1
2 siblings, 0 replies; 3+ messages in thread
From: ko1 @ 2019-08-15 4:49 UTC (permalink / raw)
To: ruby-core
Issue #16090 has been updated by ko1 (Koichi Sasada).
There is no comment so I pushed this change.
----------------------------------------
Feature #16090: RUBY_ON_BUG envval to debug
https://bugs.ruby-lang.org/issues/16090#change-80776
* Author: ko1 (Koichi Sasada)
* Status: Closed
* 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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-15 4:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-16090.20190809084323@ruby-lang.org>
2019-08-09 8:43 ` [ruby-core:94216] [Ruby master Feature#16090] RUBY_ON_BUG envval to debug ko1
2019-08-09 10:04 ` [ruby-core:94217] " shevegen
2019-08-15 4:49 ` [ruby-core:94365] " ko1
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).