Project

General

Profile

Actions

Bug #17648

closed

`__builtin_longjmp` must not be called from the same function calling `__builtin_setjmp`

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

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-02-19 master a319c04818) [armv7a-linux-eabi]
[ruby-core:<unknown>]

Description

According to the GCC manual [1], it is forbidden that __builtin_setjmp and __builtin_longjmp with the same context be called from the same function. In the current code, however, it can happen due to compiler optimizations.

The attached patch presents a workaround, which wraps __builtin_longjmp with a noinline function.

[1] https://gcc.gnu.org/onlinedocs/gcc/Nonlocal-Gotos.html


Files

ruby-longjmp_wrapper_for_builtin.patch (658 Bytes) ruby-longjmp_wrapper_for_builtin.patch xtkoba (Tee KOBAYASHI), 02/20/2021 05:02 PM
Actions #1

Updated by xtkoba (Tee KOBAYASHI) about 3 years ago

This workaround seems not necessary. Compilers seem very much aware of this situation. So please reject it. Sorry for the confusion.

Actions #2

Updated by jeremyevans0 (Jeremy Evans) about 3 years ago

  • Status changed from Open to Rejected
Actions

Also available in: Atom PDF

Like0
Like0Like0