みやむこです。

openssl のテストで SEGV しました。

  % openssl version
  OpenSSL 0.9.6b [engine] 9 Jul 2001
  % uname -srm
  Linux 2.4.18-nec3.4p1 ia64
  % make test-all
  ./miniruby ../runruby.rb --extout=.ext -- -C "../test" runner.rb --runner=console
  Loaded suite .
  Started
  略
  ../openssl/test_x509req.rb:80: [BUG] Segmentation fault
  ruby 1.9.0 (2004-07-14) [ia64-linux]

デバッガで追いかけると以下のようになります。

(gdb) where
#0  rb_class_of (obj=4053488) at ../ruby.h:644
#1  0x40000000000fcf10 in rb_obj_is_kind_of (obj=4053488,
    c=2305843009217882320) at ../object.c:484
#2  0x200000000045e120 in ossl_asn1_default_tag (obj=4053488)
    at ../../../ext/openssl/ossl_asn1.c:565
#3  0x2000000000462810 in ossl_asn1cons_to_der (self=4053488)
    at ../../../ext/openssl/ossl_asn1.c:960
#4  0x400000000007d550 in call_cfunc (func=0x2000000000731800,
    recv=2305843009217747440, len=0, argc=0, argv=0x0) at ../eval.c:5396

Index: ossl_asn1.c
===================================================================
RCS file: /src/ruby/ext/openssl/ossl_asn1.c,v
retrieving revision 1.7
diff -u -r1.7 ossl_asn1.c
--- ossl_asn1.c	24 May 2004 16:50:59 -0000	1.7
+++ ossl_asn1.c	14 Jul 2004 07:37:37 -0000
@@ -950,7 +950,7 @@
 }

 static VALUE
-ossl_asn1cons_to_der(self)
+ossl_asn1cons_to_der(VALUE self)
 {
     int tag, tn, tc, explicit;
     long seq_len, length;


あと、報告だけですが uninitialized constant OpenSSL::X509::V_FLAG_CRL_CHECK
といわれます。openssl のバージョンが 0.96 だからでしょうか。

% testrb19 test/openssl
Loaded suite openssl
Started
.................................E
Finished in 2.241209 seconds.

  1) Error:
test_verify(OpenSSL::TestX509Store):
NameError: uninitialized constant OpenSSL::X509::V_FLAG_CRL_CHECK
    ./test/openssl/test_x509store.rb:112:in `test_verify'

34 tests, 524 assertions, 0 failures, 1 errors

--
みやむこ・かつゆき