Project

General

Profile

Bug #11185

[PATCH] openssl: use RB_GC_GUARD instead of volatile

Added by normalperson (Eric Wong) about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:69371]

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:

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

Associated revisions

Revision 9fbf4887
Added by normal about 4 years ago

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:

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.

  • 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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50646
Added by normalperson (Eric Wong) about 4 years ago

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:

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.

  • 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]

Revision 50646
Added by normal about 4 years ago

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:

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.

  • 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]

Revision 50646
Added by normal about 4 years ago

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:

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.

  • 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]

Revision 50646
Added by normal about 4 years ago

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:

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.

  • 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]

Revision 50646
Added by normal about 4 years ago

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:

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.

  • 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]

Revision 7d7ed2c2
Added by usa (Usaku NAKAMURA) about 4 years ago

merge revision(s) 50646: [Backport #11185]

    * 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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@50808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50808
Added by usa (Usaku NAKAMURA) about 4 years ago

merge revision(s) 50646: [Backport #11185]

* 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]

Revision 70e6382b
Added by nagachika (Tomoyuki Chikanaga) about 4 years ago

merge revision(s) 50646: [Backport #11185]

    * 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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50837
Added by nagachika (Tomoyuki Chikanaga) about 4 years ago

merge revision(s) 50646: [Backport #11185]

* 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]

History

#1

Updated by Anonymous about 4 years ago

  • 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:

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.

  • 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]

Updated by usa (Usaku NAKAMURA) about 4 years ago

  • 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.

Updated by nagachika (Tomoyuki Chikanaga) about 4 years ago

  • 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