diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-10-10 16:08:39 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-09-26 19:19:53 +0900 |
commit | 98375ec94127df19d70c80756374a33b05617d14 (patch) | |
tree | 723dc25f37a9dc0d46e1468ab5554bdb85ea272f /ext/openssl/ossl_x509ext.c | |
parent | 0e454d620de690f02d73edb96e4215a7857baf77 (diff) | |
download | ruby-openssl-98375ec94127df19d70c80756374a33b05617d14.tar.gz |
Guard static variable first
[ This is a backport to the 2.1 branch. ]
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): register the static
variable to grab an internal object, before creating the object.
otherwise the just-created object could get collected during the
global variable list allocation. [Bug #16196]
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): prefer
`rb_gc_register_mark_object`, which is better for constant
objects, over `rb_gc_register_address` for global/static
variables which can be re-assigned at runtime. [Bug #16196]
(cherry picked from commit ruby/ruby@203b7fa1ae8cc40d41c38d684f70b3fea7fae813 and
commit ruby/ruby@9c0cd5c569ba22bc68d1a77ad6580a275cd99639)
Diffstat (limited to 'ext/openssl/ossl_x509ext.c')
0 files changed, 0 insertions, 0 deletions