Bug #11185
closed
[PATCH] openssl: use RB_GC_GUARD instead of volatile
Added by normalperson (Eric Wong) almost 9 years ago.
Updated almost 9 years ago.
Description
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:
-
the intent of the macro use is clear
-
RB_GC_GUARD only affects its call site, "volatile" generates some
extra code every time the variable is used, hurting optimization.
-
"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
- Status changed from Open to Closed
Applied in changeset r50646.
openssl: use RB_GC_GUARD instead of volatile
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:
-
the intent of the macro use is clear
-
RB_GC_GUARD only affects its call site, "volatile" generates some
extra code every time the variable is used, hurting optimization.
-
"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.
- ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile
[ruby-core:69371] [Bug #11185]
- Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED
ruby_2_1 r50808 merged revision(s) 50646.
- 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.
Also available in: Atom
PDF
Like0
Like0Like0Like0