Segmentation fault when compiled with -O2 or higher on ARM Android
To reproduce a segmentation fault, compile Ruby with
CFLAGS=-Oz using Android NDK r22 (Clang 11.0.5), and input the following:
require 'rubygems' pp
A segmentation fault also occurs with
CFLAGS=-O2 when Up or Down key is pressed in IRB.
A workaround is to disable using
I have no idea if there are similar issues or not in non-Android Linux systems on 32-bit ARM.
Bug #14480 seems to suggest that there was a similar case on AArch64 Linux with GCC.