[The FreeBSD is from a gcc 4.2.1 toolchain based build.]

My poudriere build of lang/ruby25 failed with:

--- compile.o ---
In file included from ./include/ruby.h:33,
                 from internal.h:15,
                 from compile.c:12:
In function 'iseq_build_kw.isra.76',
    inlined from 'rb_iseq_build_from_ary' at compile.c:7865:30:
./include/ruby/ruby.h:1587:36: warning: argument 1 range [2147483648, 
4294967295] exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
 #define RB_ALLOC_N(type,n) ((type*)ruby_xmalloc2((size_t)(n),sizeof(type)))
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/ruby/ruby.h:1593:25: note: in expansion of macro 'RB_ALLOC_N'
 #define ALLOC_N(type,n) RB_ALLOC_N(type,n)
                         ^~~~~~~~~~
compile.c:7765:11: note: in expansion of macro 'ALLOC_N'
     dvs = ALLOC_N(VALUE, (unsigned int)default_len);
           ^~~~~~~
In file included from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from compile.c:12:
compile.c: In function 'rb_iseq_build_from_ary':
./include/ruby/defines.h:195:18: note: in a call to allocation function 
'ruby_xmalloc2' declared here
 #define xmalloc2 ruby_xmalloc2
                  ^~~~~~~~~~~~~
./include/ruby/defines.h:208:7: note: in expansion of macro 'xmalloc2'
 void *xmalloc2(size_t,size_t) RUBY_ATTR_ALLOC_SIZE((1,2));
       ^~~~~~~~
--- miniruby ---
linking miniruby
--- .rbconfig.time ---
--- encdb.h ---
generating encdb.h
--- .rbconfig.time ---
Segmentation fault (core dumped)
*** [.rbconfig.time] Error code 139

make[1]: stopped in /wrkdirs/usr/ports/lang/ruby25/work/ruby-2.5.5
--- encdb.h ---
Segmentation fault (core dumped)
*** [encdb.h] Error code 139

make[1]: stopped in /wrkdirs/usr/ports/lang/ruby25/work/ruby-2.5.5
2 errors


The segmentation faults have backtraces like:

Core was generated by `./miniruby -I./lib -I. -I.ext/common -n -e 
BEGIN{version=ARGV.shift;mis=ARGV.dup'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  _restgpr_30_x () at /usr/src/lib/csu/powerpc/crtsavres.S:186
186     RESTGPR_X(30)
(gdb) bt
#0  _restgpr_30_x () at /usr/src/lib/csu/powerpc/crtsavres.S:186
#1  0x0198d998 in rb_sym_intern (ptr=ptr@entry=0x1a0f3b8 "begin", 
len=len@entry=-1317676078, enc=<optimized out>) at symbol.c:1026
#2  0x0198da38 in rb_sym_intern_ascii (ptr=ptr@entry=0x1a0f3b8 "begin", 
len=-1317676078) at symbol.c:1038
#3  0x0198da6c in rb_sym_intern_ascii_cstr (ptr=ptr@entry=0x1a0f3b8 "begin") at 
symbol.c:1044
#4  0x01987b3c in struct_make_members_list (ar=ar@entry=0xffffcef4) at 
struct.c:359
#5  0x0198a810 in rb_struct_define_without_accessor 
(class_name=class_name@entry=0x1a116c0 "Range", super=1107060600, 
alloc=alloc@entry=0x1922b70 <range_alloc>) at struct.c:420
#6  0x01925664 in Init_Range () at range.c:1314
#7  0x018ac2d4 in rb_call_inits () at inits.c:43
#8  0x018869c8 in ruby_setup () at eval.c:61
#9  0x01888a8c in ruby_init () at eval.c:78
#10 0x01812f50 in main (argc=<optimized out>, argv=<optimized out>) at 
./main.c:41


Core was generated by `./miniruby -I./lib -I. -I.ext/common 
./tool/generic_erb.rb -c -o encdb.h ./templ'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  _restgpr_30_x () at /usr/src/lib/csu/powerpc/crtsavres.S:186
186     RESTGPR_X(30)
(gdb) bt
#0  _restgpr_30_x () at /usr/src/lib/csu/powerpc/crtsavres.S:186
#1  0x0198d998 in rb_sym_intern (ptr=ptr@entry=0x1a0f3b8 "begin", 
len=len@entry=789211824, enc=<optimized out>) at symbol.c:1026
#2  0x0198da38 in rb_sym_intern_ascii (ptr=ptr@entry=0x1a0f3b8 "begin", 
len=789211824) at symbol.c:1038
#3  0x0198da6c in rb_sym_intern_ascii_cstr (ptr=ptr@entry=0x1a0f3b8 "begin") at 
symbol.c:1044
#4  0x01987b3c in struct_make_members_list (ar=ar@entry=0xffffcfd4) at 
struct.c:359
#5  0x0198a810 in rb_struct_define_without_accessor 
(class_name=class_name@entry=0x1a116c0 "Range", super=1107060600, 
alloc=alloc@entry=0x1922b70 <range_alloc>) at struct.c:420
#6  0x01925664 in Init_Range () at range.c:1314
#7  0x018ac2d4 in rb_call_inits () at inits.c:43
#8  0x018869c8 in ruby_setup () at eval.c:61
#9  0x01888a8c in ruby_init () at eval.c:78
#10 0x01812f50 in main (argc=<optimized out>, argv=<optimized out>) at 
./main.c:41

Where /usr/src/lib/csu/powerpc/crtsavres.S has the ma ro below in use:

#define RESTGPR_X(r)    _CRTENTRY(__CONCAT(__CONCAT(_restgpr_,r),_x))   \
        lwz     r,(-128 + r*4)(11)


For reference:

(gdb) disass
Dump of assembler code for function _restgpr_30_x:
=> 0x41b3ced8 <+0>:     lwz     r30,-8(r11)

(gdb) info reg r11
r11            0x6f                111


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to