The VM built by travis (201805090836, 64-bit Squeak Cog Spur) segfaults when creating an SSL connection. Here is a stack trace from gdb:
Program received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x00007ffff296132a in sqVerifyNameInner (ssl=ssl@entry=0x89b3e0, cert=cert@entry=0x8abdb0, serverName=0x89bad0, serverNameLength=serverNameLength@entry=13, matchType=matchType@entry=2) at /home/travis/build/OpenSmalltalk/opensmalltalk-vm/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc:106 #2 0x00007ffff29614ab in sqVerifyDNS (ssl=ssl@entry=0x89b3e0, cert=cert@entry=0x8abdb0, serverName=<optimized out>, serverNameLength=serverNameLength@entry=13) at /home/travis/build/OpenSmalltalk/opensmalltalk-vm/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc:94 #3 0x00007ffff2961e3f in sqConnectSSL (handle=handle@entry=1, srcBuf=srcBuf@entry=0x1025330 "\026\003\003", srcLen=srcLen@entry=279, dstBuf=dstBuf@entry=0x1020b88 "\026\003\003", dstLen=<optimized out>) at /home/travis/build/OpenSmalltalk/opensmalltalk-vm/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc:454 #4 0x00007ffff295de2f in primitiveConnect () at /home/travis/build/OpenSmalltalk/opensmalltalk-vm/src/plugins/SqueakSSL/SqueakSSL.c:217
This happens on Ubuntu 14.04 (libssl1.0.0). I presume travis had a newer version of openssl, and the different value of OPENSSL_VERSION_NUMBER during compilation time was enough to make some functions, like _sqo_sk_GENERAL_NAME_num_ be linked to null. It's not exactly clear how the overlay works, so I just tried a few functions and got the following results:
(gdb) print sqo_X509_get_ext_d2i $3 = (void *(*)(X509 *, int, int *, int *)) 0x7ffff2440a90 <X509_get_ext_d2i> (gdb) print sqo_sk_GENERAL_NAME_num No symbol "sqo_sk_GENERAL_NAME_num" in current context. (gdb) print sqo_sk_GENERAL_NAME_value No symbol "sqo_sk_GENERAL_NAME_value" in current context. (gdb) print sqVerifySAN $6 = {sqInt (sqSSL *, const GENERAL_NAME *, const void *, const size_t, const int)} 0x7ffff29610f0 <sqVerifySAN> (gdb) print sk_GENERAL_NAME_num No symbol "sk_GENERAL_NAME_num" in current context. (gdb) print sqo_SKM_sk_num No symbol "sqo_SKM_sk_num" in current context. (gdb) print sqo_sk_num $7 = (int (*)(const _STACK *)) 0x0 (gdb) print sk_num $8 = {<text variable, no debug info>} 0x7ffff24064c0 <sk_num>
If you need any further information, let me know.
The same thing happens if the VM is compiled on Ubuntu 14.04.
The situation is even worse than I thought. On Debian 9, which has libssl1.0.2 and libssl1.1 installed by default, everything went fine until libssl1.0.0 had to be installed for an older application. Images started after the installation crash at the same point.
Closed #260.
Should be fixed in 97b799c, please test
Thank you. The fix works in all situations mentioned above.
splendid
vm-dev@lists.squeakfoundation.org