B
Bil Kleb
During compile of the 08-26-2004 stable snapshot, I get a warning:
gcc -g -O2 -I. -I. -c eval.c
eval.c: In function `massign':
eval.c:4912: warning: cast from pointer to integer of different size
For convenience,
4907 assign(self, list->nd_head, RARRAY(val)->ptr, pcall);
4908 list = list->nd_next;
4909 }
4910 if (pcall && list) goto arg_error;
4911 if (node->nd_args) {
4912 if ((int)(node->nd_args) == -1) {
4913 /* no check for mere `*' */
4914 }
4915 else if (!list && i<len) {
4916 assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
The make eventually fails with,
gcc -g -O2 -rdynamic main.o dmyext.o libruby-static.a -ldl -lcrypt -lm -o miniruby
./lib/ftools.rb:204: [BUG] Segmentation fault
ruby 1.8.2 (2004-08-26) [ia64-linux]
And
gdb miniruby
r mkconfig.rb rbconfig.rb
provides,
Program received signal SIGSEGV, Segmentation fault.
rb_yield_0 (val=2305843009218535704, self=2305843009218655784, klass=0, flags=-68136, avalue=0) at eval.c:4726
4726 if ((state = EXEC_TAG()) == 0) {
bt
#0 rb_yield_0 (val=2305843009218535704, self=2305843009218655784, klass=0, flags=-68136, avalue=0) at eval.c:4726
#1 0x4000000000026620 in rb_yield (val=2305843009218535704) at eval.c:4826
#2 0x400000000011cda0 in rb_ary_each (ary=2305843009218534304) at array.c:1112
#3 0x400000000002ae00 in rb_call0 (klass=2305843009218685664, recv=2305843009218534304, id=3825, oid=0, argc=0, argv=0x0, body=0x20000000004c2298,
nosuper=62488) at eval.c:5404
#4 0x400000000002ccb0 in rb_call (klass=2305843009218685664, recv=2305843009218534304, mid=3825, argc=0, argv=0x0, scope=0) at eval.c:5756
#5 0x400000000001be30 in rb_eval (self=2305843009218655784, n=0x60000000000062b8) at eval.c:2988
#6 0x400000000002c240 in rb_call0 (klass=2305843009218655744, recv=2305843009218655784, id=10273, oid=0, argc=2, argv=0x60000fffffff6500,
body=0x20000000004a0c60, nosuper=-45416) at eval.c:5663
#7 0x400000000002ccb0 in rb_call (klass=2305843009218655744, recv=2305843009218655784, mid=10273, argc=2, argv=0x60000fffffff6500, scope=0) at eval.c:5756
#8 0x400000000001e010 in rb_eval (self=2305843009218737024, n=0x60000000000062b8) at eval.c:3257
#9 0x4000000000013380 in eval_node (self=2305843009218737024, node=0x20000000004b0160) at eval.c:1287
#10 0x40000000000140f0 in ruby_exec () at eval.c:1456
#11 0x40000000000141d0 in ruby_run () at eval.c:1477
#12 0x400000000000f3d0 in Init_ext () at main.c:50
#13 0x4000000000025b80 in rb_yield_0 (val=Cannot access memory at address 0x60000fff7fffbfa0) at eval.c:4726
#14 0x400000000000f200 in _start ()
#15 0x4000000000025b80 in rb_yield_0 (val=Cannot access memory at address 0x60000fff7fffbef8) at eval.c:4726
Cannot access memory at address 0x60000fff7fffbf98
list
4721 }
4722 ruby_current_node = node;
4723
4724 PUSH_ITER(block->iter);
4725 PUSH_TAG(lambda ? PROT_NONE : PROT_YIELD);
4726 if ((state = EXEC_TAG()) == 0) {
4727 redo:
4728 if (nd_type(node) == NODE_CFUNC || nd_type(node) == NODE_IFUNC) {
4729 if (node->nd_state == YIELD_FUNC_AVALUE) {
4730 if (!avalue) {
Any ideas?
Thanks,
gcc -g -O2 -I. -I. -c eval.c
eval.c: In function `massign':
eval.c:4912: warning: cast from pointer to integer of different size
For convenience,
4907 assign(self, list->nd_head, RARRAY(val)->ptr, pcall);
4908 list = list->nd_next;
4909 }
4910 if (pcall && list) goto arg_error;
4911 if (node->nd_args) {
4912 if ((int)(node->nd_args) == -1) {
4913 /* no check for mere `*' */
4914 }
4915 else if (!list && i<len) {
4916 assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
The make eventually fails with,
gcc -g -O2 -rdynamic main.o dmyext.o libruby-static.a -ldl -lcrypt -lm -o miniruby
./lib/ftools.rb:204: [BUG] Segmentation fault
ruby 1.8.2 (2004-08-26) [ia64-linux]
And
gdb miniruby
r mkconfig.rb rbconfig.rb
provides,
Program received signal SIGSEGV, Segmentation fault.
rb_yield_0 (val=2305843009218535704, self=2305843009218655784, klass=0, flags=-68136, avalue=0) at eval.c:4726
4726 if ((state = EXEC_TAG()) == 0) {
bt
#0 rb_yield_0 (val=2305843009218535704, self=2305843009218655784, klass=0, flags=-68136, avalue=0) at eval.c:4726
#1 0x4000000000026620 in rb_yield (val=2305843009218535704) at eval.c:4826
#2 0x400000000011cda0 in rb_ary_each (ary=2305843009218534304) at array.c:1112
#3 0x400000000002ae00 in rb_call0 (klass=2305843009218685664, recv=2305843009218534304, id=3825, oid=0, argc=0, argv=0x0, body=0x20000000004c2298,
nosuper=62488) at eval.c:5404
#4 0x400000000002ccb0 in rb_call (klass=2305843009218685664, recv=2305843009218534304, mid=3825, argc=0, argv=0x0, scope=0) at eval.c:5756
#5 0x400000000001be30 in rb_eval (self=2305843009218655784, n=0x60000000000062b8) at eval.c:2988
#6 0x400000000002c240 in rb_call0 (klass=2305843009218655744, recv=2305843009218655784, id=10273, oid=0, argc=2, argv=0x60000fffffff6500,
body=0x20000000004a0c60, nosuper=-45416) at eval.c:5663
#7 0x400000000002ccb0 in rb_call (klass=2305843009218655744, recv=2305843009218655784, mid=10273, argc=2, argv=0x60000fffffff6500, scope=0) at eval.c:5756
#8 0x400000000001e010 in rb_eval (self=2305843009218737024, n=0x60000000000062b8) at eval.c:3257
#9 0x4000000000013380 in eval_node (self=2305843009218737024, node=0x20000000004b0160) at eval.c:1287
#10 0x40000000000140f0 in ruby_exec () at eval.c:1456
#11 0x40000000000141d0 in ruby_run () at eval.c:1477
#12 0x400000000000f3d0 in Init_ext () at main.c:50
#13 0x4000000000025b80 in rb_yield_0 (val=Cannot access memory at address 0x60000fff7fffbfa0) at eval.c:4726
#14 0x400000000000f200 in _start ()
#15 0x4000000000025b80 in rb_yield_0 (val=Cannot access memory at address 0x60000fff7fffbef8) at eval.c:4726
Cannot access memory at address 0x60000fff7fffbf98
list
4721 }
4722 ruby_current_node = node;
4723
4724 PUSH_ITER(block->iter);
4725 PUSH_TAG(lambda ? PROT_NONE : PROT_YIELD);
4726 if ((state = EXEC_TAG()) == 0) {
4727 redo:
4728 if (nd_type(node) == NODE_CFUNC || nd_type(node) == NODE_IFUNC) {
4729 if (node->nd_state == YIELD_FUNC_AVALUE) {
4730 if (!avalue) {
Any ideas?
Thanks,