Looks crashed when thread with some instance_eval on Linux/MacOSX #2090

Closed
kachick opened this Issue Dec 8, 2012 · 5 comments

2 participants

@kachick
Rubinius member

Detail

https://gist.github.com/4241151

ExampleCode

Thread.new {sleep}.instance_eval do
  initialize {}
end #=> ABORTING ...
@dbussink dbussink added a commit that closed this issue Dec 10, 2012
@dbussink dbussink Fix thread aliveness state tracking
Only mark a thread as alive when it's actually running. This allows for
using it to check that we don't try to start a thread multiple times.

Fixes #2090
bf9c28e
@dbussink dbussink closed this in bf9c28e Dec 10, 2012
@kachick
Rubinius member

Thanks!

I have confirmed that is fixed now on below environments.
Both rbx occur a instance of ThreadError. :)

  • rubinius 2.0.0rc1 (1.8.7 bf9c28e 2012-11-02 JI) [x86_64-unknown-linux-gnu]
  • rubinius 2.0.0rc1 (1.9.3 bf9c28e 2012-11-02 JI) [x86_64-unknown-linux-gnu]
  • rubinius 2.0.0rc1 (1.8.7 bf9c28e 2012-11-02 JI) [x86_64-apple-darwin11.4.2]
  • rubinius 2.0.0rc1 (1.9.3 bf9c28e 2012-11-02 JI) [x86_64-apple-darwin11.4.2]
@dbussink
Rubinius member

Curious, where did this code come from? Seems really weird to do this in normal Ruby code :).

@kachick
Rubinius member

Yeah, this is not come from my product code.
I tried to run the some MRI's test case.
This is a one.

reference
https://github.com/ruby/ruby/blob/trunk/test/ruby/test_proc.rb
test_proc_location

@dbussink
Rubinius member

Ah ok, interesting. Porting over MRI tests to Rubyspec is a long standing goal for us to do, so that Rubyspec actually also uses that.

@kachick
Rubinius member

OK.
I'm reading the guide now.

http://rubyspec.org/style_guide/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment