Issue #11514 has been updated by Nobuyoshi Nakada.


I think that `NoMemoryError` must raise in such case.
Where does the failure occur?
You can run ruby with `gdb` by `--debugger` option.

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --debugger --extout=.ext  -- --disable-gems "./bin/rdoc" --root "." --page-dir "./doc" --encoding=UTF-8 --no-force-update --all --ri --op ".ext/rdoc" --debug  "."
~~~

I don't remember `dbx` however, if it does not have `--args` option or similar, you need to run to just start:

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --debugger=dbx --extout=.ext
~~~

and then run with the rest arguments.

----------------------------------------
Bug #11514: AIX6.1 - Ruby 2.2.3 - Segmentation fault in :byteslice
https://bugs.ruby-lang.org/issues/11514#change-54189

* Author: Tony Reix
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ?? ruby 2.1.1p76 (2014-02-24 revision 45161) [powerpc-aix6.1.0.0]
* Backport: 
----------------------------------------
Testing Ruby 2.2.3 on AIX6.1 built with xlc (same with gcc) leads to a reproducible crash.
See complete trace in attached file.
Ruby version is: RUBY_PROGRAM_VERSION=2.2.3 .

~~~
# gmake V=1 test-all
...
objcopy -w -L 'Init_*' -L '*_threadptr_*' libruby.so.2.2.0
:
/usr/vac/bin/xlc_r  -g -qinfo=por   -L.  -bE:ruby.imp -brtl -blibpath:NONE/lib:/usr/lib:/lib  main.o  -L/usr/local/lib -lruby  -lpthread -lgmp -ldl -lcrypt -lm    -o ruby
:
gmake[2]: Leaving directory `/opt/freeware/src/packages/BUILD/ruby-2.2.3'
gmake[1]: Leaving directory `/opt/freeware/src/packages/BUILD/ruby-2.2.3'
Generating RDoc documentation
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./bin/rdoc" --root "." --page-dir "./doc" --encoding=UTF-8 --no-force-update --all --ri --op ".ext/rdoc" --debug  "."
Parsing sources...
100% [967/967]  vsnprintf.c                                                                   

Generating RI format into /opt/freeware/src/packages/BUILD/ruby-2.2.3/.ext/rdoc...

BEFORE @generator.generate in lib/rdoc/rdoc.rb
/opt/freeware/src/packages/BUILD/ruby-2.2.3/lib/rdoc/markup/parser.rb:331: [BUG] **Segmentation fault** at 0x000004
ruby 2.2.3p173 (2015-08-18 revision 51636) [powerpc-aix6.1.9.0]

-- Control frame information -----------------------------------------------
c:0025 p:---- s:0126 e:000125 CFUNC  **:byteslice**
c:0024 p:0019 s:0121 e:000120 METHOD /opt/freeware/src/packages/BUILD/ruby-2.2.3/lib/rdoc/markup/parser.rb:331
c:0023 p:0009 s:0116 e:000115 METHOD /opt/freeware/src/packages/BUILD/ruby-2.2.3/lib/rdoc/markup/parser.rb:547
c:0022 p:0438 s:0111 e:000108 METHOD /opt/freeware/src/packages/BUILD/ruby-2.2.3/lib/rdoc/markup/parser.rb:501
c:0021 p:0017 s:0099 e:000098 METHOD /opt/freeware/src/packages/BUILD/ruby-2.2.3/lib/rdoc/markup/parser.rb:62
c:0020 p:0019 s:0093 e:000092 METHOD /opt/freeware/src/packages/BUILD/ruby-2.2.3/lib/rdoc/markup.rb:748
...

gmake: *** [rdoc] IOT/Abort trap (core dumped)


# ll ./.ext/rdoc/core
-rw-------    1 root     system    269015892 Sep  8 14:08 ./.ext/rdoc/core


# dbx ./ruby ./.ext/rdoc/core

IOT/Abort trap in pthread_kill at 0xd051ceb4 ($t1)
0xd051ceb4 (pthread_kill+0xb4) 80410014         lwz   r2,0x14(r1)
(dbx) where
pthread_kill(??, ??) at 0xd051ceb4
_p_raise(??) at 0xd051c2e8
raise.raise(??) at 0xd011f8a0
abort() at 0xd01a9a04
die(), line 395 in "error.c"
libdebug assertion "(framep->getGpr(STKP, &addr) == DB_SUCCESS && *nextStkpp == addr)" failed at line 1299 in file ../../../../../../../../../../../src/bos/usr/ccs/lib/libdbx/libdebug/modules/stackdebug/POWER/stackdb_FrameProgress.C
rb_bug_context(ctx = 0x200f83b0, fmt = "Segmentation fault at %p", ... = 0x4, 0xd052f200, 0x0, 0x117100f5, 0x117100f5, 0x200f7f28), line 427 in "error.c"
sigsegv(sig = 11, info = 0x200f863c, ctx = 0x200f83b0), line 879 in "signal.c"


---Files--------------------------------
RubyCore (15.8 KB)


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