[#50466] [ruby-trunk - Bug #7492][Open] Segmentation fault at DL::TestDL#test_call_double on x64 Windows 8 — "phasis68 (Heesob Park)" <phasis@...>
23 messages
2012/12/02
[#59083] [ruby-trunk - Bug #7492] Segmentation fault at DL::TestDL#test_call_double on x64 Windows 8
— "phasis68 (Heesob Park)" <phasis@...>
2013/12/13
[#50483] [IMPORTANT] 2.0.0 release plan — Yusuke Endoh <mame@...>
ALL COMMITTERS SHOULD READ THIS MAIL! コミッタはこのメール読んで!
5 messages
2012/12/02
[#50561] [ruby-trunk - Bug #7513][Open] TracePoint#enable/disable should not cause error — "ko1 (Koichi Sasada)" <redmine@...>
7 messages
2012/12/05
[#50575] [ruby-trunk - Feature #7517][Open] Fixnum::MIN,MAX — "matz (Yukihiro Matsumoto)" <matz@...>
20 messages
2012/12/05
[#50593] [ruby-trunk - Feature #7517] Fixnum::MIN,MAX
— "shyouhei (Shyouhei Urabe)" <shyouhei@...>
2012/12/05
[#50594] Re: [ruby-trunk - Feature #7517] Fixnum::MIN,MAX
— Charles Oliver Nutter <headius@...>
2012/12/05
On Wed, Dec 5, 2012 at 12:24 PM, shyouhei (Shyouhei Urabe)
[#50636] [ruby-trunk - Bug #7528][Open] CSV.== fails to check object type — "SteveW (Stephen Wattam)" <stephenwattam@...>
6 messages
2012/12/06
[#50660] [ruby-trunk - Feature #4085] Refinements and nested methods — "trans (Thomas Sawyer)" <transfire@...>
3 messages
2012/12/07
[#50699] Commit access for Yehuda Katz — Aaron Patterson <tenderlove@...>
Hi,
4 messages
2012/12/08
[#50923] Re: Commit access for Yehuda Katz
— Charles Oliver Nutter <headius@...>
2012/12/16
I will +1 this, unsure if it has happened already (it's "catch up on
[#50733] [ruby-trunk - Bug #7539][Open] Misleading error message "can't convert nil into string" — "connec (Chris Connelly)" <chris@...>
8 messages
2012/12/10
[#50755] Becoming a committer — Charlie Somerville <charlie@...>
Hi ruby-core,
21 messages
2012/12/11
[#50759] Re: Becoming a committer
— Yukihiro Matsumoto <matz@...>
2012/12/11
Hi,
[#50784] Re: Becoming a committer
— Charles Oliver Nutter <headius@...>
2012/12/11
It's really this easy? If so, I'll send over my public key today :)
[#50795] Re: Becoming a committer
— Yukihiro Matsumoto <matz@...>
2012/12/11
Hi,
[#50797] Re: Becoming a committer
— Charles Oliver Nutter <headius@...>
2012/12/11
I guess there's a few things I'd be interested in:
[#50809] Re: Becoming a committer
— SASADA Koichi <ko1@...>
2012/12/12
(2012/12/12 8:55), Charles Oliver Nutter wrote:
[#50815] Re: Becoming a committer
— Charles Oliver Nutter <headius@...>
2012/12/12
On Wed, Dec 12, 2012 at 12:04 AM, SASADA Koichi <[email protected]> wrote:
[#50816] Re: Becoming a committer
— "NARUSE, Yui" <naruse@...>
2012/12/12
2012/12/12 Charles Oliver Nutter <[email protected]>:
[#50817] Re: Becoming a committer
— Charles Oliver Nutter <headius@...>
2012/12/12
On Wed, Dec 12, 2012 at 2:59 AM, NARUSE, Yui <[email protected]> wrote:
[#50765] [ruby-trunk - Bug #7544][Open] Accented characters in IRB — cfabianski (Cédric FABIANSKI) <cfabianski@...>
6 messages
2012/12/11
[#50793] [ruby-trunk - Bug #7547][Open] Dir.mktmpdir('~something') tries to expand a profile directory — "jstanley0 (Jeremy Stanley)" <jeremy@...>
4 messages
2012/12/11
[#50810] [ruby-trunk - Feature #7549][Open] A Ruby Design Process — "brixen (Brian Ford)" <brixen@...>
34 messages
2012/12/12
[#50829] [ruby-trunk - Feature #7549] A Ruby Design Process
— "subwindow (Erik Peterson)" <erik@...>
2012/12/12
[#50837] [ruby-trunk - Feature #7549] A Ruby Design Process
— "subwindow (Erik Peterson)" <erik@...>
2012/12/12
[#50867] [ruby-trunk - Bug #7556][Assigned] test error on refinement — "usa (Usaku NAKAMURA)" <usa@...>
14 messages
2012/12/13
[#50900] [ruby-trunk - Bug #7564][Open] r38175 introduces incompatibility — "tenderlovemaking (Aaron Patterson)" <aaron@...>
14 messages
2012/12/14
[#50913] [ruby-trunk - Bug #7568][Open] Yaml fails to encode zero date string. — "anshul (Anshul Khandelwal)" <anshul@...>
5 messages
2012/12/15
[#50920] [ruby-trunk - Bug #7568][Assigned] Yaml fails to encode zero date string.
— "charliesome (Charlie Somerville)" <charlie@...>
2012/12/16
[#50988] Re: [ruby-trunk - Bug #7568][Assigned] Yaml fails to encode zero date string.
— Aaron Patterson <tenderlove@...>
2012/12/19
On Sun, Dec 16, 2012 at 12:53:14PM +0900, charliesome (Charlie Somerville) wrote:
[#51015] 1.9.3 patch level release — Zachary Scott <zachary@...>
I know unak-san was asking about a 1.9.3 patch level release, so I
8 messages
2012/12/20
[#51099] [ruby-trunk - Feature #7612][Open] Enumerators take a proc — "pedz (Perry Smith)" <pedz@...>
4 messages
2012/12/23
[ruby-core:51145] [ruby-trunk - Bug #7624] How to handle exceptions raised in event hook?
From:
"ko1 (Koichi Sasada)" <redmine@...>
Date:
2012-12-26 08:23:06 UTC
List:
ruby-core #51145
Issue #7624 has been updated by ko1 (Koichi Sasada).
File 193backport_exception_in_settracefunc.patch added
I tried to move this ticket to backport193, but I can't move it (system error?).
I attached a patch for 1.9.3. Please try it.
----------------------------------------
Bug #7624: How to handle exceptions raised in event hook?
https://bugs.ruby-lang.org/issues/7624#change-35087
Author: ko1 (Koichi Sasada)
Status: Closed
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-12-21 trunk 38515) [i386-mswin32_100]
The following program raises an exception in `return' event hook.
###
class FOO < RuntimeError; end
class BAR < RuntimeError; end
def m1; m2; end
def m2; m3; end
def m3; raise FOO; end
set_trace_func(lambda{|*args|
if args[0] == 'return'
p args
raise BAR # raise in trace_func
end})
begin
m1
rescue => e
p e
ensure
p :ensure
end
###
And this program cause strange behavior in each versions.
---
# 2.0 trunk
ruby 2.0.0dev (2012-12-21 trunk 38515) [i386-mswin32_100]
["return", "test.rb", 5, :m3, #<Binding:0x9781c8>, Object]
test.rb:9:in `block in <main>': BAR (BAR)
from test.rb:5:in `m3'
from test.rb:4:in `m2'
from test.rb:3:in `m1'
from test.rb:12:in `<main>'
# 1.9.3p332 (2012-11-15 revision 37660)
ruby 1.9.3p332 (2012-11-15 revision 37660) [i386-mswin32_100]
["return", "test.rb", 5, :m3, #<Binding:0x2682980>, Object]
["return", "test.rb", 5, :m3, #<Binding:0x268278c>, Object]
... # infinite loop
# 1.8.7
ruby 1.8.7 (2012-06-29 patchlevel 370) [i386-cygwin]
["return", "test.rb", 5, :m3, #<Binding:0x80057adc>, Object]
["return", "test.rb", 5, :m2, #<Binding:0x80057a64>, Object]
["return", "test.rb", 5, :m1, #<Binding:0x80057884>, Object]
test.rb:13: [BUG] unexpected local variable assignment
ruby 1.8.7 (2012-06-29 patchlevel 370) [i386-cygwin]
1 [sig] ruby 7388 open_stackdumpfile: Dumping stack trace to ruby.exe.stackdump
# [BUG] !! and line number is not correct.
---
# JRuby
$ bin/jruby --debug -v test.rb
jruby 1.7.2.dev (1.9.3p327) 2012-12-25 dc3af39 on OpenJDK Client VM 1.6.0_18-b18 [linux-i386]
["return", "test.rb", 5, :m3, #<Binding:0x1f7896f>, Object]
["return", "test.rb", 4, :m2, #<Binding:0x1abbec4>, Object]
["return", "test.rb", 3, :m1, #<Binding:0x2c03ff>, Object]
#<BAR: BAR>
:ensure
---
# Ancient Ruby
# 1.6.5
$ versions/install-tags_v1_6_5_/bin/ruby 'test.rb' 2>&1
["return", "test.rb", 3, :m3, #<Binding:0xf755c7d0>, Object]
["return", "test.rb", 12, :m2, #<Binding:0xf755c5c8>, Object]
["return", "test.rb", 5, :m1, #<Binding:0xf755c424>, Object]
#<BAR: BAR>
:ensure
# 1.8.6
$ versions/install-tags_v1_8_6_420_/bin/ruby 'test.rb' 2>&1
["return", "test.rb", 5, :m3, #<Binding:0x7f9bc3032530>, Object]
["return", "test.rb", 4, :m2, #<Binding:0x7f9bc3032440>, Object]
["return", "test.rb", 3, :m1, #<Binding:0x7f9bc3032080>, Object]
test.rb:13: [BUG] unexpected local variable assignment
ruby 1.8.6 (2010-09-02) [x86_64-linux]
---
1.8 and before, exceptions from trace_fook are raised as normal exceptions.
JRuby (with --debug) emulates this behavior correctly.
Also CRuby 1.9 tried to handle exceptions as normal exceptions.
However, it becomes infinite loop.
### (1) exception are occurred at m3
m1
m2
m3
raise
### (2) pop stack frames
m1
m2
m3
### (3) try m3 return hook
m1
m2
m3
m3_return_hook
### (4) exception at m3_return_hook
m1
m2
m3
m3_return_hook
raise
### (5) pop stack frames and go to (3)
m1
m2
m3
MRI 1.8 invokes hooks *after* pop m3.
However, MRI 1.9 invoke hooks *before* pop m3.
This is why infinite loop was made.
----
To solve this issue, current 2.0 pop all stack frames before return hook (when handling exception).
Hoever, `ensure' etc was skipped. This is also issues.
[Bug 7622], [Bug 7592]
This corner case is confusing.
----
There are several solution about it.
(1) Emulate 1.8's behavior.
Which JRuby does :)
No compatibility issue.
(2) Do not propagate any errors from trace block
Like thread, prohibit all of errors and escape (such as throw).
(2') Output errors if any errors are occurred
(3) Exit thread or program which current trunk done.
----
I think only few people use set_trace_func()
because send bug report on it.
(3) seems bad because ensure clause is ignored.
This means current trunk is buggy.
(1) is best way because no incompatibility
and no discussion is needed.
(2) (and (2')) has incompatible behavior from 1.9 and 1.8.
But this approach seems good because trace hooks should not affect
main program.
I think (1) and (2) is valuable to discuss.
----
I'm sorry to propose such issue includes *compatibility*.
I want to make it clear current status and choose correct way.
--
http://bugs.ruby-lang.org/