ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:77784] [Ruby trunk Bug#12876] Calling new hangs Ruby when class prepends an empty module and makes initialize method public
       [not found] <redmine.issue-12876.20161027141844@ruby-lang.org>
@ 2016-10-27 14:18 ` james
  2016-10-28  5:33 ` [ruby-core:77791] [Ruby trunk Bug#12876][Assigned] " shyouhei
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: james @ 2016-10-27 14:18 UTC (permalink / raw
  To: ruby-core

Issue #12876 has been reported by James Mead.

----------------------------------------
Bug #12876: Calling new hangs Ruby when class prepends an empty module and makes initialize method public
https://bugs.ruby-lang.org/issues/12876

* Author: James Mead
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.0.0p648 and ruby 2.1.3p242 onwards
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
```ruby
module Foo
end

class Bar
  prepend Foo

  public :initialize
end

p Bar.new # => hangs
```

## Runs OK

* ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin14.0]
* ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin14.0]
* ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin14.0]
* rubinius 3.33 (2.2.2 db6f477e 2016-05-23 3.8.1) [x86_64-darwin14.5.0]

## Hangs on last line

* ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin14.5.0]
* ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
* ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
* ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-darwin14.0]
* ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin14]
* ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
* ruby 2.4.0preview2 (2016-09-09 trunk 56129) [x86_64-darwin14]

This might be related to Bug #12832, although in this case it is possible to interrupt with ctrl-C and the problem exists in Ruby v2.0.0 as well as v2.1.3 onwards.




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:77791] [Ruby trunk Bug#12876][Assigned] Calling new hangs Ruby when class prepends an empty module and makes initialize method public
       [not found] <redmine.issue-12876.20161027141844@ruby-lang.org>
  2016-10-27 14:18 ` [ruby-core:77784] [Ruby trunk Bug#12876] Calling new hangs Ruby when class prepends an empty module and makes initialize method public james
@ 2016-10-28  5:33 ` shyouhei
  2016-10-29 18:18 ` [ruby-core:77810] [Ruby trunk Bug#12876] " nagachika00
  2016-11-14 17:59 ` [ruby-core:78129] " nagachika00
  3 siblings, 0 replies; 4+ messages in thread
From: shyouhei @ 2016-10-28  5:33 UTC (permalink / raw
  To: ruby-core

Issue #12876 has been updated by Shyouhei Urabe.

Status changed from Open to Assigned
Assignee set to Koichi Sasada

```
zsh % lldb -- ./miniruby -v ~/tmp.rb
(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args  "-v" "/Users/urabe.shyouhei/tmp.rb"
(lldb) run
Process 98447 launched: './miniruby' (x86_64)
ruby 2.4.0dev (2016-10-27 trunk 56506) [x86_64-darwin15]
Process 98447 stopped
* thread #1: tid = 0x42e6d, 0x00000001001f1b4c miniruby`rb_callable_method_entry + 19 at vm_method.c:806, stop reason = signal SIGSTOP
    frame #0: 0x00000001001f1b4c miniruby`rb_callable_method_entry + 19 at vm_method.c:806
   803      struct rb_id_table *mtbl;
   804      const rb_callable_method_entry_t *cme;
   805
-> 806      if (me && me->defined_class == 0) {
   807          VM_ASSERT(RB_TYPE_P(defined_class, T_ICLASS) || RB_TYPE_P(defined_class, T_MODULE));
   808          VM_ASSERT(me->defined_class == 0);
   809
(lldb) bt
* thread #1: tid = 0x42e6d, 0x00000001001f1b4c miniruby`rb_callable_method_entry + 19 at vm_method.c:806, stop reason = signal SIGSTOP
  * frame #0: 0x00000001001f1b4c miniruby`rb_callable_method_entry + 19 at vm_method.c:806
    frame #1: 0x00000001001f1b39 miniruby`rb_callable_method_entry(klass=<unavailable>, id=3105) + 25
    frame #2: 0x00000001002007dd miniruby`vm_call0_body(th=0x00000001005064d0, calling=0x00007fff5fbfd450, ci=0x00007fff5fbfd440, cc=<unavailable>, argv=0x0000000100700040) + 1021 at vm_eval.c:206
    frame #3: 0x0000000100200e7d miniruby`rb_call0 + 189 at vm_eval.c:61
    frame #4: 0x0000000100200e47 miniruby`rb_call0(recv=4303747680, mid=3105, argc=0, argv=0x0000000100700040, scope=CALL_FCALL, self=<unavailable>) + 135
    frame #5: 0x00000001000f3f41 miniruby`rb_class_new_instance(argc=0, argv=0x0000000100700040, klass=<unavailable>) + 33 at object.c:1880
    frame #6: 0x00000001001f0ca6 miniruby`vm_call_cfunc + 184 at vm_insnhelper.c:1752
    frame #7: 0x00000001001f0bee miniruby`vm_call_cfunc(th=0x00000001005064d0, reg_cfp=0x00000001007fffa0, calling=<unavailable>, ci=<unavailable>, cc=<unavailable>) + 46
    frame #8: 0x00000001001feeae miniruby`vm_call_method_each_type(th=0x00000001005064d0, cfp=0x00000001007fffa0, calling=0x00007fff5fbfd700, ci=<unavailable>, cc=<unavailable>) + 142 at vm_insnhelper.c:2138
    frame #9: 0x00000001001ff40b miniruby`vm_call_method(th=0x00000001005064d0, cfp=0x00000001007fffa0, calling=<unavailable>, ci=<unavailable>, cc=<unavailable>) + 235 at vm_insnhelper.c:2288
    frame #10: 0x00000001001f8349 miniruby`vm_exec_core(th=0x00000001005064d0, initial=<unavailable>) + 5961 at insns.def:1066
    frame #11: 0x00000001001fd94a miniruby`vm_exec(th=0x00000001005064d0) + 138 at vm.c:1711
    frame #12: 0x00000001000826e0 miniruby`ruby_exec_internal(n=0x0000000100864330) + 176 at eval.c:244
    frame #13: 0x000000010008638f miniruby`ruby_run_node [inlined] ruby_exec_node(n=<unavailable>) + 47 at eval.c:308
    frame #14: 0x000000010008637b miniruby`ruby_run_node(n=<unavailable>) + 27
    frame #15: 0x000000010021759e miniruby`main(argc=<unavailable>, argv=<unavailable>) + 78 at main.c:36
    frame #16: 0x00007fff8e0db5ad libdyld.dylib`start + 1
(lldb)
```

----------------------------------------
Bug #12876: Calling new hangs Ruby when class prepends an empty module and makes initialize method public
https://bugs.ruby-lang.org/issues/12876#change-61095

* Author: James Mead
* Status: Assigned
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: ruby 2.0.0p648 and ruby 2.1.3p242 onwards
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
```ruby
module Foo
end

class Bar
  prepend Foo

  public :initialize
end

p Bar.new # => hangs
```

## Runs OK

* ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin14.0]
* ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin14.0]
* ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin14.0]
* rubinius 3.33 (2.2.2 db6f477e 2016-05-23 3.8.1) [x86_64-darwin14.5.0]

## Hangs on last line

* ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin14.5.0]
* ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
* ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
* ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-darwin14.0]
* ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin14]
* ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
* ruby 2.4.0preview2 (2016-09-09 trunk 56129) [x86_64-darwin14]

This might be related to Bug #12832, although in this case it is possible to interrupt with ctrl-C and the problem exists in Ruby v2.0.0 as well as v2.1.3 onwards.




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:77810] [Ruby trunk Bug#12876] Calling new hangs Ruby when class prepends an empty module and makes initialize method public
       [not found] <redmine.issue-12876.20161027141844@ruby-lang.org>
  2016-10-27 14:18 ` [ruby-core:77784] [Ruby trunk Bug#12876] Calling new hangs Ruby when class prepends an empty module and makes initialize method public james
  2016-10-28  5:33 ` [ruby-core:77791] [Ruby trunk Bug#12876][Assigned] " shyouhei
@ 2016-10-29 18:18 ` nagachika00
  2016-11-14 17:59 ` [ruby-core:78129] " nagachika00
  3 siblings, 0 replies; 4+ messages in thread
From: nagachika00 @ 2016-10-29 18:18 UTC (permalink / raw
  To: ruby-core

Issue #12876 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED

----------------------------------------
Bug #12876: Calling new hangs Ruby when class prepends an empty module and makes initialize method public
https://bugs.ruby-lang.org/issues/12876#change-61116

* Author: James Mead
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: ruby 2.0.0p648 and ruby 2.1.3p242 onwards
* Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
----------------------------------------
```ruby
module Foo
end

class Bar
  prepend Foo

  public :initialize
end

p Bar.new # => hangs
```

## Runs OK

* ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin14.0]
* ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin14.0]
* ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin14.0]
* rubinius 3.33 (2.2.2 db6f477e 2016-05-23 3.8.1) [x86_64-darwin14.5.0]

## Hangs on last line

* ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin14.5.0]
* ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
* ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
* ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-darwin14.0]
* ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin14]
* ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
* ruby 2.4.0preview2 (2016-09-09 trunk 56129) [x86_64-darwin14]

This might be related to Bug #12832, although in this case it is possible to interrupt with ctrl-C and the problem exists in Ruby v2.0.0 as well as v2.1.3 onwards.




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:78129] [Ruby trunk Bug#12876] Calling new hangs Ruby when class prepends an empty module and makes initialize method public
       [not found] <redmine.issue-12876.20161027141844@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2016-10-29 18:18 ` [ruby-core:77810] [Ruby trunk Bug#12876] " nagachika00
@ 2016-11-14 17:59 ` nagachika00
  3 siblings, 0 replies; 4+ messages in thread
From: nagachika00 @ 2016-11-14 17:59 UTC (permalink / raw
  To: ruby-core

Issue #12876 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE

ruby_2_3 r56783 merged revision(s) 56520.

----------------------------------------
Bug #12876: Calling new hangs Ruby when class prepends an empty module and makes initialize method public
https://bugs.ruby-lang.org/issues/12876#change-61491

* Author: James Mead
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: ruby 2.0.0p648 and ruby 2.1.3p242 onwards
* Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE
----------------------------------------
```ruby
module Foo
end

class Bar
  prepend Foo

  public :initialize
end

p Bar.new # => hangs
```

## Runs OK

* ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin14.0]
* ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin14.0]
* ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin14.0]
* rubinius 3.33 (2.2.2 db6f477e 2016-05-23 3.8.1) [x86_64-darwin14.5.0]

## Hangs on last line

* ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin14.5.0]
* ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
* ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
* ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-darwin14.0]
* ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin14]
* ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
* ruby 2.4.0preview2 (2016-09-09 trunk 56129) [x86_64-darwin14]

This might be related to Bug #12832, although in this case it is possible to interrupt with ctrl-C and the problem exists in Ruby v2.0.0 as well as v2.1.3 onwards.




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-14 17:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-12876.20161027141844@ruby-lang.org>
2016-10-27 14:18 ` [ruby-core:77784] [Ruby trunk Bug#12876] Calling new hangs Ruby when class prepends an empty module and makes initialize method public james
2016-10-28  5:33 ` [ruby-core:77791] [Ruby trunk Bug#12876][Assigned] " shyouhei
2016-10-29 18:18 ` [ruby-core:77810] [Ruby trunk Bug#12876] " nagachika00
2016-11-14 17:59 ` [ruby-core:78129] " nagachika00

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