Rb_obj_is_kind_of

rb_obj_is_kind_of e$B$Ne(B TYPE(cl) e$B$G$9$,!"e(B[ruby-dev:31805]
e$B$NNce(B
e$B$G$OLdBj$,=P$J$/$J$C$?$b$N$N!"e(Btest/runner.rb e$B$G$O0MA3$H$7$Fe(B
e$BH/@8$7$^$9!#e(B

e$B:#EY$Oe(B T_NONE e$B$N$h$&$G$9!#e(B

% gdb ruby
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for
details.
This GDB was configured as “i386-linux”…Using host libthread_db
library “/lib/tls/libthread_db.so.1”.

(gdb) run test/runner.rb
Starting program: /tmp/a/ruby/ruby test/runner.rb
[Thread debugging using libthread_db enabled]
[New Thread -1210334112 (LWP 12910)]
[New Thread -1211065424 (LWP 12913)]
Skipping permutation tests.
[New Thread -1222419536 (LWP 12914)]
Loaded suite .
Started
…F…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE…FEEEE…rb:
object.c:394: rb_obj_is_kind_of: Assertion `rb_type((VALUE)(cl)) ==
RUBY_T_CLASS || rb_type((VALUE)(cl)) == RUBY_T_ICLASS’ failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread -1210334112 (LWP 12910)]
0xb7de583b in raise () from /lib/tls/libc.so.6
(gdb) up
#1 0xb7de6fa2 in abort () from /lib/tls/libc.so.6
(gdb)
#2 0xb7ddf2df in __assert_fail () from /lib/tls/libc.so.6
(gdb)
#3 0x080776cd in rb_obj_is_kind_of (obj=0, c=3074890140) at ruby.h:897
897 if (obj == Qfalse) return rb_cFalseClass;
(gdb)
#4 0x0806329b in os_obj_of (of=3074890140) at gc.c:1746
1746 if (rb_obj_is_kind_of((VALUE)p, of)) {
(gdb) rp p
T_NONE: $1 = (struct RBasic *) 0xb7a9f83c
(gdb) p *$1
$2 = {flags = 32, klass = 3078415720}
(gdb) rp 3078415720
T_NONE: $3 = (struct RBasic *) 0xb77ce568
(gdb) bt
#0 0xb7de583b in raise () from /lib/tls/libc.so.6
#1 0xb7de6fa2 in abort () from /lib/tls/libc.so.6
#2 0xb7ddf2df in __assert_fail () from /lib/tls/libc.so.6
#3 0x080776cd in rb_obj_is_kind_of (obj=0, c=3074890140) at ruby.h:897
#4 0x0806329b in os_obj_of (of=3074890140) at gc.c:1746
#5 0x0806333c in os_each_obj (argc=0, argv=0x0) at gc.c:1801
#6 0x080d975a in call_cfunc (func=0x80632f0 <os_each_obj>,
recv=3083978460, len=6, argc=12910, argv=0xb7d3b158)
at insnhelper.ci:276
#7 0x080dac95 in vm_call_cfunc (th=0x815d160, reg_cfp=0xb7dbab00,
num=1, id=8080, recv=3083978460, klass=3083978360,
mn=0xb7d1c664, blockptr=0x0) at insnhelper.ci:365
#8 0x080d9e86 in vm_call_method (th=0x815d160, cfp=0xb7dbab00, num=1,
blockptr=0xb7dbab14, flag=0, id=8080, mn=0x815d160,
recv=3083978460, klass=3083978360) at insnhelper.ci:490
#9 0x080d53e0 in vm_eval (th=0x815d160, initial=0) at insns.def:1073
#10 0x080d8530 in vm_eval_body (th=0x815d160) at vm.c:1162
#11 0x080d36a3 in invoke_block (th=0x815d160, block=0xb7dbac2c, self=0,
argc=-1210340308, argv=0xbfecce20) at vm.c:582
#12 0x080d3786 in vm_yield (th=0x326e, argc=0, argv=0x0) at vm.c:604
#13 0x0805b451 in rb_yield_0 (argc=0, argv=0x0) at eval.c:904
#14 0x0805b484 in rb_yield (val=3074839100) at eval.c:915
#15 0x080e2e9f in each_i (ary=3074855760) at array.c:1143
#16 0x0805bc89 in rb_ensure (b_proc=0x80e2e70 <each_i>,
data1=3074855760, e_proc=0x80e2e30 <each_unlock>, data2=3074855760)
at eval.c:1189
#17 0x080e2f0d in rb_ary_each (ary=3074855760) at array.c:1167
#18 0x080d9761 in call_cfunc (func=0x80e2eb0 <rb_ary_each>,
recv=3074855760, len=6, argc=12910, argv=0xb7d3b11c)
at insnhelper.ci:279
#19 0x080dac95 in vm_call_cfunc (th=0x815d160, reg_cfp=0xb7dbac18,
num=0, id=392, recv=3074855760, klass=3084046840,
mn=0xb7d2cac8, blockptr=0x0) at insnhelper.ci:365
#20 0x080d9e86 in vm_call_method (th=0x815d160, cfp=0xb7dbac18, num=0,
blockptr=0xb7dbac2c, flag=0, id=392, mn=0x815d160,
recv=3074855760, klass=3084046840) at insnhelper.ci:490
#21 0x080d53e0 in vm_eval (th=0x815d160, initial=0) at insns.def:1073
#22 0x080d8530 in vm_eval_body (th=0x815d160) at vm.c:1162
#23 0x080d36a3 in invoke_block (th=0x815d160, block=0xb7dbad0c, self=0,
argc=-1210340084, argv=0xbfecd420) at vm.c:582
#24 0x080d3786 in vm_yield (th=0x326e, argc=0, argv=0x0) at vm.c:604
#25 0x0805b451 in rb_yield_0 (argc=0, argv=0x0) at eval.c:904
#26 0x0805b484 in rb_yield (val=3074855780) at eval.c:915
#27 0x080e2e9f in each_i (ary=3074835180) at array.c:1143
#28 0x0805bc89 in rb_ensure (b_proc=0x80e2e70 <each_i>,
data1=3074835180, e_proc=0x80e2e30 <each_unlock>, data2=3074835180)
at eval.c:1189
#29 0x080e2f0d in rb_ary_each (ary=3074835180) at array.c:1167
#30 0x080d9761 in call_cfunc (func=0x80e2eb0 <rb_ary_each>,
recv=3074835180, len=6, argc=12910, argv=0xb7d3b0ec)
at insnhelper.ci:279
—Type to continue, or q to quit—
#31 0x080dac95 in vm_call_cfunc (th=0x815d160, reg_cfp=0xb7dbacf8,
num=0, id=392, recv=3074835180, klass=3084046840,
mn=0xb7d2cac8, blockptr=0x0) at insnhelper.ci:365
#32 0x080d9e86 in vm_call_method (th=0x815d160, cfp=0xb7dbacf8, num=0,
blockptr=0xb7dbad0c, flag=0, id=392, mn=0x815d160,
recv=3074835180, klass=3084046840) at insnhelper.ci:490
#33 0x080d53e0 in vm_eval (th=0x815d160, initial=0) at insns.def:1073
#34 0x080d8530 in vm_eval_body (th=0x815d160) at vm.c:1162
#35 0x080d36a3 in invoke_block (th=0x815d160, block=0xb7dbadec, self=0,
argc=-1210339860, argv=0xbfecda20) at vm.c:582
#36 0x080d3786 in vm_yield (th=0x326e, argc=0, argv=0x0) at vm.c:604
#37 0x0805b451 in rb_yield_0 (argc=0, argv=0x0) at eval.c:904
#38 0x0805b484 in rb_yield (val=3074835220) at eval.c:915
#39 0x080e2e9f in each_i (ary=3073412860) at array.c:1143
#40 0x0805bc89 in rb_ensure (b_proc=0x80e2e70 <each_i>,
data1=3073412860, e_proc=0x80e2e30 <each_unlock>, data2=3073412860)
at eval.c:1189
#41 0x080e2f0d in rb_ary_each (ary=3073412860) at array.c:1167
#42 0x080d9761 in call_cfunc (func=0x80e2eb0 <rb_ary_each>,
recv=3073412860, len=6, argc=12910, argv=0xb7d3b0bc)
at insnhelper.ci:279
#43 0x080dac95 in vm_call_cfunc (th=0x815d160, reg_cfp=0xb7dbadd8,
num=0, id=392, recv=3073412860, klass=3084046840,
mn=0xb7d2cac8, blockptr=0x0) at insnhelper.ci:365
#44 0x080d9e86 in vm_call_method (th=0x815d160, cfp=0xb7dbadd8, num=0,
blockptr=0xb7dbadec, flag=0, id=392, mn=0x815d160,
recv=3073412860, klass=3084046840) at insnhelper.ci:490
#45 0x080d53e0 in vm_eval (th=0x815d160, initial=0) at insns.def:1073
#46 0x080d8530 in vm_eval_body (th=0x815d160) at vm.c:1162
#47 0x080d88fa in rb_iseq_eval (iseqval=3083963580) at vm.c:1371
#48 0x0805a589 in ruby_exec_node (n=0xb7d18cf8, file=0x8195bd1
“test/runner.rb”) at eval.c:231
#49 0x0805a5ef in ruby_run_node (n=0xb7d18cf8) at eval.c:256
#50 0x08057757 in main (argc=0, argv=0x0, envp=0xbfece160) at main.c:46
(gdb)

[email protected]$G$9!#e(B

At Fri, 21 Sep 2007 20:31:22 +0900,
Tanaka A. wrote in [ruby-dev:31810]:

rb_obj_is_kind_of e$B$Ne(B TYPE(cl) e$B$G$9$,!"e(B[ruby-dev:31805] e$B$NNce(B
e$B$G$OLdBj$,=P$J$/$J$C$?$b$N$N!"e(Btest/runner.rb e$B$G$O0MA3$H$7$Fe(B
e$BH/@8$7$^$9!#e(B

e$B:#EY$Oe(B T_NONE e$B$N$h$&$G$9!#e(B

finalizere$BBT$A$N$h$&$G$9$M!#e(B

Index: gc.c

— gc.c (revision 13483)
+++ gc.c (working copy)
@@ -1704,5 +1704,6 @@ os_live_obj(void)
for (;p < pend; p++) {
if (p->as.basic.flags) {

  • switch (TYPE§) {
  • switch (BUILTIN_TYPE§) {
  •  case T_NONE:
     case T_ICLASS:
     case T_NODE:

[email protected]$G$9!#e(B

At Sat, 22 Sep 2007 10:30:57 +0900,
Tanaka A. wrote in [ruby-dev:31812]:

In article [email protected],
Nobuyoshi N. [email protected] writes:

finalizere$BBT$A$N$h$&$G$9$M!#e(B

e$B%Q%C%A$rEv$F$F$_$^$7$?$,!"$^[email protected]=P$^$9!#e(B

e$B:#EY$be(B T_NONE e$B$N$h$&$G$9!#e(B

e$BFs%v=jI,MW$G$7$?!#$G$-$l$P$R$H$D$K$^$H$a$?$$$H$3$G$9$,!#e(B

Index: gc.c

— gc.c (revision 13483)
+++ gc.c (working copy)
@@ -1704,5 +1662,6 @@ os_live_obj(void)
for (;p < pend; p++) {
if (p->as.basic.flags) {

  • switch (TYPE§) {
  • switch (BUILTIN_TYPE§) {
  •  case T_NONE:
     case T_ICLASS:
     case T_NODE:
    

@@ -1735,5 +1694,6 @@ os_obj_of(VALUE of)
for (;p < pend; p++) {
if (p->as.basic.flags) {

  • switch (TYPE§) {
  • switch (BUILTIN_TYPE§) {
  •  case T_NONE:
     case T_ICLASS:
     case T_NODE:

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:31813] Re: rb_obj_is_kind_of”
on Sat, 22 Sep 2007 12:29:44 +0900, Nobuyoshi N.
[email protected] writes:

|> e$B:#EY$be(B T_NONE e$B$N$h$&$G$9!#e(B
|
|e$BFs%v=jI,MW$G$7$?!#$G$-$l$P$R$H$D$K$^$H$a$?$$$H$3$G$9$,!#e(B

e$B%3%_%C%H$7$F$/[email protected]$5$$!#%j%U%!%/%?%j%s%0$9$k$+$I$&$+$O!"$*G$$;e(B
e$B$7$^$9!#e(B

In article [email protected],
Nobuyoshi N. [email protected] writes:

finalizere$BBT$A$N$h$&$G$9$M!#e(B

e$B%Q%C%A$rEv$F$F$_$^$7$?$,!"$^[email protected]=P$^$9!#e(B

e$B:#EY$be(B T_NONE e$B$N$h$&$G$9!#e(B

% gdb ruby
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for
details.
This GDB was configured as “i386-linux”…Using host libthread_db
library “/lib/tls/libthread_db.so.1”.

(gdb) run test/runner.rb
Starting program: /tmp/a/ruby/ruby test/runner.rb
[Thread debugging using libthread_db enabled]
[New Thread -1209809824 (LWP 19486)]
[New Thread -1210541136 (LWP 19489)]
Skipping permutation tests.
[New Thread -1221895248 (LWP 19490)]
Loaded suite .
Started
…F…rb:
object.c:394: rb_obj_is_kind_of: Assertion `rb_type((VALUE)(cl)) ==
RUBY_T_CLASS || rb_type((VALUE)(cl)) == RUBY_T_ICLASS’ failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread -1209809824 (LWP 19486)]
0xb7e6583b in raise () from /lib/tls/libc.so.6
(gdb) up
#1 0xb7e66fa2 in abort () from /lib/tls/libc.so.6
(gdb)
#2 0xb7e5f2df in __assert_fail () from /lib/tls/libc.so.6
(gdb)
#3 0x0807766d in rb_obj_is_kind_of (obj=0, c=3076569300) at ruby.h:897
897 if (obj == Qfalse) return rb_cFalseClass;
(gdb)
#4 0x0806323b in os_obj_of (of=3076569300) at gc.c:1747
1747 if (rb_obj_is_kind_of((VALUE)p, of)) {
(gdb) rp p
T_NONE: $1 = (struct RBasic *) 0xb784e394
(gdb) p *$1
$2 = {flags = 32, klass = 3078790120}
(gdb) rp 3078790120
T_NONE: $3 = (struct RBasic *) 0xb7829be8
(gdb) bt
#0 0xb7e6583b in raise () from /lib/tls/libc.so.6
#1 0xb7e66fa2 in abort () from /lib/tls/libc.so.6
#2 0xb7e5f2df in __assert_fail () from /lib/tls/libc.so.6
#3 0x0807766d in rb_obj_is_kind_of (obj=0, c=3076569300) at ruby.h:897
#4 0x0806323b in os_obj_of (of=3076569300) at gc.c:1747
#5 0x080632dc in os_each_obj (argc=0, argv=0x0) at gc.c:1802
#6 0x080d96fa in call_cfunc (func=0x8063290 <os_each_obj>,
recv=3084502740, len=6, argc=19486, argv=0xb7dbb158)
at insnhelper.ci:276
#7 0x080dac35 in vm_call_cfunc (th=0x815d160, reg_cfp=0xb7e3ab00,
num=1, id=8080, recv=3084502740, klass=3084502640,
mn=0xb7d9c65c, blockptr=0x0) at insnhelper.ci:365
#8 0x080d9e26 in vm_call_method (th=0x815d160, cfp=0xb7e3ab00, num=1,
blockptr=0xb7e3ab14, flag=0, id=8080, mn=0x815d160,
recv=3084502740, klass=3084502640) at insnhelper.ci:490
#9 0x080d5380 in vm_eval (th=0x815d160, initial=0) at insns.def:1073
#10 0x080d84d0 in vm_eval_body (th=0x815d160) at vm.c:1162
#11 0x080d3643 in invoke_block (th=0x815d160, block=0xb7e3ac2c, self=0,
argc=-1209816020, argv=0xbfcd6c30) at vm.c:582
#12 0x080d3726 in vm_yield (th=0x4c1e, argc=0, argv=0x0) at vm.c:604
#13 0x0805b451 in rb_yield_0 (argc=0, argv=0x0) at eval.c:904
#14 0x0805b484 in rb_yield (val=3076549360) at eval.c:915
#15 0x080e2e3f in each_i (ary=3076555000) at array.c:1143
#16 0x0805bc89 in rb_ensure (b_proc=0x80e2e10 <each_i>,
data1=3076555000, e_proc=0x80e2dd0 <each_unlock>, data2=3076555000)
at eval.c:1189
#17 0x080e2ead in rb_ary_each (ary=3076555000) at array.c:1167
#18 0x080d9701 in call_cfunc (func=0x80e2e50 <rb_ary_each>,
recv=3076555000, len=6, argc=19486, argv=0xb7dbb11c)
at insnhelper.ci:279
#19 0x080dac35 in vm_call_cfunc (th=0x815d160, reg_cfp=0xb7e3ac18,
num=0, id=392, recv=3076555000, klass=3084571120,
mn=0xb7dacac0, blockptr=0x0) at insnhelper.ci:365
#20 0x080d9e26 in vm_call_method (th=0x815d160, cfp=0xb7e3ac18, num=0,
blockptr=0xb7e3ac2c, flag=0, id=392, mn=0x815d160,
recv=3076555000, klass=3084571120) at insnhelper.ci:490
#21 0x080d5380 in vm_eval (th=0x815d160, initial=0) at insns.def:1073
#22 0x080d84d0 in vm_eval_body (th=0x815d160) at vm.c:1162
#23 0x080d3643 in invoke_block (th=0x815d160, block=0xb7e3ad0c, self=0,
argc=-1209815796, argv=0xbfcd7230) at vm.c:582
#24 0x080d3726 in vm_yield (th=0x4c1e, argc=0, argv=0x0) at vm.c:604
#25 0x0805b451 in rb_yield_0 (argc=0, argv=0x0) at eval.c:904
#26 0x0805b484 in rb_yield (val=3076555020) at eval.c:915
#27 0x080e2e3f in each_i (ary=3076547940) at array.c:1143
#28 0x0805bc89 in rb_ensure (b_proc=0x80e2e10 <each_i>,
data1=3076547940, e_proc=0x80e2dd0 <each_unlock>, data2=3076547940)
at eval.c:1189
#29 0x080e2ead in rb_ary_each (ary=3076547940) at array.c:1167
#30 0x080d9701 in call_cfunc (func=0x80e2e50 <rb_ary_each>,
recv=3076547940, len=6, argc=19486, argv=0xb7dbb0ec)
at insnhelper.ci:279
—Type to continue, or q to quit—
#31 0x080dac35 in vm_call_cfunc (th=0x815d160, reg_cfp=0xb7e3acf8,
num=0, id=392, recv=3076547940, klass=3084571120,
mn=0xb7dacac0, blockptr=0x0) at insnhelper.ci:365
#32 0x080d9e26 in vm_call_method (th=0x815d160, cfp=0xb7e3acf8, num=0,
blockptr=0xb7e3ad0c, flag=0, id=392, mn=0x815d160,
recv=3076547940, klass=3084571120) at insnhelper.ci:490
#33 0x080d5380 in vm_eval (th=0x815d160, initial=0) at insns.def:1073
#34 0x080d84d0 in vm_eval_body (th=0x815d160) at vm.c:1162
#35 0x080d3643 in invoke_block (th=0x815d160, block=0xb7e3adec, self=0,
argc=-1209815572, argv=0xbfcd7830) at vm.c:582
#36 0x080d3726 in vm_yield (th=0x4c1e, argc=0, argv=0x0) at vm.c:604
#37 0x0805b451 in rb_yield_0 (argc=0, argv=0x0) at eval.c:904
#38 0x0805b484 in rb_yield (val=3076547960) at eval.c:915
#39 0x080e2e3f in each_i (ary=3073926760) at array.c:1143
#40 0x0805bc89 in rb_ensure (b_proc=0x80e2e10 <each_i>,
data1=3073926760, e_proc=0x80e2dd0 <each_unlock>, data2=3073926760)
at eval.c:1189
#41 0x080e2ead in rb_ary_each (ary=3073926760) at array.c:1167
#42 0x080d9701 in call_cfunc (func=0x80e2e50 <rb_ary_each>,
recv=3073926760, len=6, argc=19486, argv=0xb7dbb0bc)
at insnhelper.ci:279
#43 0x080dac35 in vm_call_cfunc (th=0x815d160, reg_cfp=0xb7e3add8,
num=0, id=392, recv=3073926760, klass=3084571120,
mn=0xb7dacac0, blockptr=0x0) at insnhelper.ci:365
#44 0x080d9e26 in vm_call_method (th=0x815d160, cfp=0xb7e3add8, num=0,
blockptr=0xb7e3adec, flag=0, id=392, mn=0x815d160,
recv=3073926760, klass=3084571120) at insnhelper.ci:490
#45 0x080d5380 in vm_eval (th=0x815d160, initial=0) at insns.def:1073
#46 0x080d84d0 in vm_eval_body (th=0x815d160) at vm.c:1162
#47 0x080d889a in rb_iseq_eval (iseqval=3084487860) at vm.c:1371
#48 0x0805a589 in ruby_exec_node (n=0xb7d98cf0, file=0x8195bd1
“test/runner.rb”) at eval.c:231
#49 0x0805a5ef in ruby_run_node (n=0xb7d98cf0) at eval.c:256
#50 0x08057757 in main (argc=0, argv=0x0, envp=0xbfcd7f70) at main.c:46
(gdb)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs