Project

General

Profile

Actions

Bug #20633

closed

compile error at vm_insnhelper.c when HAVE_DECL_ATOMIC_SIGNAL_FENCE is 0

Added by kimuraw (Wataru Kimura) 4 days ago. Updated 2 days ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
[ruby-dev:<unknown>]

Description

木村といいます。

最近導入された、vm_insnhelper.c 中での atomic_signal_fence()の呼び出し[1]が
config.hで ”#define HAVE_DECL_ATOMIC_SIGNAL_FENCE 0” のときコンパイルエラーになります。

おそらくコードの意図と異なると思うのでパッチ送ります。

compiling array.c
compiling vm.c
In file included from vm.c:514:
./vm_insnhelper.c:400:5: warning: implicit declaration of function 'atomic_signal_fence' is invalid in C99 [-Wimplicit-function-declaration]
    atomic_signal_fence(memory_order_seq_cst);
    ^
./vm_insnhelper.c:400:25: error: use of undeclared identifier 'memory_order_seq_cst'
    atomic_signal_fence(memory_order_seq_cst);
                        ^
1 warning and 1 error generated.

[1] Add explicit compiler fence when pushing frames to ensure safe profiling
https://github.com/ruby/ruby/commit/64fef3b870a8ed8147654531aef4c065d8a730c6


Files

patch-vm_insnhelper.c.diff (535 Bytes) patch-vm_insnhelper.c.diff kimuraw (Wataru Kimura), 07/13/2024 10:31 AM
Actions

Also available in: Atom PDF

Like0
Like1Like0Like0