我在文件中的属性构造函数“ConnectionInit”中有这样的代码,用C编写。
SSL_load_error_strings();
SSL_library_init();
DefaultSSLConnectionContext = SSL_CTX_new(SSLv23_client_method ());
当我将它与 protobuf 生成的 pb.cc 文件链接时(不调用它的代码,只是链接),它以这样的转储为核心:
#0 0x00007f269454acea in pthread_rwlock_wrlock () from /lib64/libpthread.so.0
#0 0x00007f269454acea in pthread_rwlock_wrlock () from /lib64/libpthread.so.0
#1 0x00007f26843dbcbb in ?? () from /usr/lib64/libcrypto.so.10
#2 0x00007f26843dba0b in ?? () from /usr/lib64/libcrypto.so.10
#3 0x00007f26843db3bc in ?? () from /usr/lib64/libcrypto.so.10
#4 0x00007f26843dc9b1 in ERR_load_ERR_strings () from /usr/lib64/libcrypto.so.10
#5 0x00007f26843dcb99 in ERR_load_crypto_strings () from /usr/lib64/libcrypto.so.10
#6 0x00007f268471ced9 in SSL_load_error_strings () from /usr/lib64/libssl.so.10
#7 0x00007f26778414f9 in ConnectionInit (verbose=0) at connection.c:79
#8 0x00007f2695a5f74f in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#9 0x00007f2695a63f75 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#10 0x00007f2695a5f366 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#11 0x00007f2695a6371a in _dl_open () from /lib64/ld-linux-x86-64.so.2
#12 0x00007f2693fa8f66 in dlopen_doit () from /lib64/libdl.so.2
#13 0x00007f2695a5f366 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#14 0x00007f2693fa929c in _dlerror_run () from /lib64/libdl.so.2
#15 0x00007f2693fa8ee1 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2
我检查了,如果 protobuf 使用 libssl。但事实并非如此。*.pb.cc 文件如何影响我的 openSSL 初始化?