From: nagachika00@... Date: 2015-06-11T16:38:47+00:00 Subject: [ruby-core:69526] [Ruby trunk - Bug #11185] [PATCH] openssl: use RB_GC_GUARD instead of volatile Issue #11185 has been updated by Tomoyuki Chikanaga. Backport changed from 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE Backported into `ruby_2_2` branch at r50837. ---------------------------------------- Bug #11185: [PATCH] openssl: use RB_GC_GUARD instead of volatile https://bugs.ruby-lang.org/issues/11185#change-52841 * Author: Eric Wong * Status: Closed * Priority: Normal * Assignee: Eric Wong * ruby -v: * Backport: 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE ---------------------------------------- From doc/extension.rdoc: > > Using the RB_GC_GUARD macro is preferable to using the "volatile" > keyword in C. RB_GC_GUARD has the following advantages: > > 1) the intent of the macro use is clear > > 2) RB_GC_GUARD only affects its call site, "volatile" generates some > extra code every time the variable is used, hurting optimization. > > 3) "volatile" implementations may be buggy/inconsistent in some > compilers and architectures. RB_GC_GUARD is customizable for broken > systems/compilers without those without negatively affecting other > systems. ---Files-------------------------------- 0001-openssl-use-RB_GC_GUARD-instead-of-volatile.patch (2.5 KB) -- https://bugs.ruby-lang.org/