This issue reproduces with a build of the jigsaw/jake forest, this forest is JDK 9 + the module system being defined by JSR 376 + JEP 261.
With the module system there is code executed at startup to resolve the initial module and define the resulting module graph to the runtime. With a run-time image containing all modules it currently adds ~800k of heap usage. This is enough to trigger OOME with G1 when running with the minimum allowed heap (2MB) and I assume 1MB regions. Sometimes OOME is thrown, sometimes it SEGVs.
To duplicate the issue requires building http://hg.openjdk.java.net/jigsaw/jake/ (it builds just like any jdk9/* forest). Then try:
java -XX:+UseG1GC -Xmx2m -version
Sometimes it will fail correctly with an OOME, sometimes it will SEGV but not always in the same place. RemoveSelfForwardPtrObjClosure::do_object seems to be the most popular:
Stack: [0x00007f648471d000,0x00007f648481e000], sp=0x00007f648481cca0, free space=1023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x608113] RemoveSelfForwardPtrObjClosure::do_object(oopDesc*)+0x73
V [libjvm.so+0x684b76] G1OffsetTableContigSpace::object_iterate(ObjectClosure*)+0x66
V [libjvm.so+0x607f06] RemoveSelfForwardPtrHRClosure::doHeapRegion(HeapRegion*)+0x106
V [libjvm.so+0x5efd02] G1CollectedHeap::collection_set_iterate_from(HeapRegion*, HeapRegionClosure*)+0x32
V [libjvm.so+0x607c50] G1ParRemoveSelfForwardPtrsTask::work(unsigned int)+0xc0
V [libjvm.so+0xaf088b] GangWorker::loop()+0x2b
V [libjvm.so+0x923fd2] java_start(Thread*)+0xc2