* [ruby-core:101917] [Ruby master Bug#17511] Segmentation fault when compiled with -O2 or higher on ARM Android
@ 2021-01-04 22:02 xtkoba+ruby
2021-01-05 5:02 ` [ruby-core:101929] " mame
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: xtkoba+ruby @ 2021-01-04 22:02 UTC (permalink / raw)
To: ruby-core
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:101929] [Ruby master Bug#17511] Segmentation fault when compiled with -O2 or higher on ARM Android
2021-01-04 22:02 [ruby-core:101917] [Ruby master Bug#17511] Segmentation fault when compiled with -O2 or higher on ARM Android xtkoba+ruby
@ 2021-01-05 5:02 ` mame
2021-01-05 13:43 ` [ruby-core:101933] " xtkoba+ruby
2021-05-03 21:10 ` [ruby-core:103704] " xtkoba+ruby
2 siblings, 0 replies; 4+ messages in thread
From: mame @ 2021-01-05 5:02 UTC (permalink / raw)
To: ruby-core
Issue #17511 has been updated by mame (Yusuke Endoh).
Thank you, I've imported your patch.
BTW, I'm curious for what purpose you are attempting to build Ruby for Android.
As I said, we currently have no CI or development environment for Arm Android.
So it is difficult for us to test the code for the environment.
I thought your patch for this ticket was very trivial, so I've imported it.
But if it was more complicated, such as fixing a test, it would be difficult for me to commit it.
If there is a practical use case for Android Ruby, I'm willing to try preparing a CI for the environment.
----------------------------------------
Bug #17511: Segmentation fault when compiled with -O2 or higher on ARM Android
https://bugs.ruby-lang.org/issues/17511#change-89777
* Author: xtkoba (Tee KOBAYASHI)
* Status: Closed
* 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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:101933] [Ruby master Bug#17511] Segmentation fault when compiled with -O2 or higher on ARM Android
2021-01-04 22:02 [ruby-core:101917] [Ruby master Bug#17511] Segmentation fault when compiled with -O2 or higher on ARM Android xtkoba+ruby
2021-01-05 5:02 ` [ruby-core:101929] " mame
@ 2021-01-05 13:43 ` xtkoba+ruby
2021-05-03 21:10 ` [ruby-core:103704] " xtkoba+ruby
2 siblings, 0 replies; 4+ messages in thread
From: xtkoba+ruby @ 2021-01-05 13:43 UTC (permalink / raw)
To: ruby-core
Issue #17511 has been updated by xtkoba (Tee KOBAYASHI).
Thanks for the merge!
My running Ruby on ARM Android is JUST FOR FUN :-)
I think it would be more productive to prepare a CI for AArch64 Android if you could, rather than for nearly out-of-date 32-bit ARM Android.
----------------------------------------
Bug #17511: Segmentation fault when compiled with -O2 or higher on ARM Android
https://bugs.ruby-lang.org/issues/17511#change-89781
* Author: xtkoba (Tee KOBAYASHI)
* Status: Closed
* 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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:103704] [Ruby master Bug#17511] Segmentation fault when compiled with -O2 or higher on ARM Android
2021-01-04 22:02 [ruby-core:101917] [Ruby master Bug#17511] Segmentation fault when compiled with -O2 or higher on ARM Android xtkoba+ruby
2021-01-05 5:02 ` [ruby-core:101929] " mame
2021-01-05 13:43 ` [ruby-core:101933] " xtkoba+ruby
@ 2021-05-03 21:10 ` xtkoba+ruby
2 siblings, 0 replies; 4+ messages in thread
From: xtkoba+ruby @ 2021-05-03 21:10 UTC (permalink / raw)
To: ruby-core
Issue #17511 has been updated by xtkoba (Tee KOBAYASHI).
Just for the record, there turns out to be a Clang/LLVM bug in its `__builtin_longjmp` implementation for ARM Linux (more specifically for non-Darwin and non-Windows) for which there seems to be no reliable workaround on user's side.
https://bugs.llvm.org/show_bug.cgi?id=50202
----------------------------------------
Bug #17511: Segmentation fault when compiled with -O2 or higher on ARM Android
https://bugs.ruby-lang.org/issues/17511#change-91797
* Author: xtkoba (Tee KOBAYASHI)
* Status: Closed
* 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)
ruby-ec-volatile.patch (838 Bytes)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-03 21:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 22:02 [ruby-core:101917] [Ruby master Bug#17511] Segmentation fault when compiled with -O2 or higher on ARM Android xtkoba+ruby
2021-01-05 5:02 ` [ruby-core:101929] " mame
2021-01-05 13:43 ` [ruby-core:101933] " xtkoba+ruby
2021-05-03 21:10 ` [ruby-core:103704] " xtkoba+ruby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).