[ruby-core:101917] [Ruby master Bug#17511] Segmentation fault when compiled with -O2 or higher on ARM Android
From:
xtkoba+ruby@...
Date:
2021-01-04 22:02:31 UTC
List:
ruby-core #101917
Issue #17511 has been reported by xtkoba (Tee KOBAYASHI). ---------------------------------------- Bug #17511: Segmentation fault when compiled with -O2 or higher on ARM Android https://bugs.ruby-lang.org/issues/17511 * Author: xtkoba (Tee KOBAYASHI) * Status: Open * Priority: Normal * ruby -v: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm-linux-android] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- 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 `__builtin_setjmp`: ``` ./configure --with-setjmp-type=setjmp ``` 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. ---Files-------------------------------- ruby-3.0.0-android-arm-__builtin_setjmp.patch (333 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>