Project

General

Profile

Actions

Bug #17511

closed

Segmentation fault when compiled with -O2 or higher on ARM Android

Added by xtkoba (Tee KOBAYASHI) over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm-linux-android]
[ruby-core:101917]

Description

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) ruby-3.0.0-android-arm-__builtin_setjmp.patch Disable using __builtin_setjmp on ARM Android xtkoba (Tee KOBAYASHI), 01/04/2021 09:57 PM
ruby-ec-volatile.patch (838 Bytes) ruby-ec-volatile.patch xtkoba (Tee KOBAYASHI), 02/21/2021 08:10 PM

Related issues 1 (1 open0 closed)

Related to Ruby master - Bug #14480: miniruby crashing when compiled with -O2 or -O1 on aarch64OpenActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0