Subject: Re: libssh crash on Mac

Re: libssh crash on Mac

From: Jan Ehrhardt <phpdev_at_ehrhardt.nl>
Date: Tue, 13 Aug 2019 09:37:40 +0200

Leo in gmane.network.ssh.libssh2.devel (Fri, 9 Aug 2019 22:34:59 -0400):
>But the crash happens when the operation is passed to libssh2. So my
>only hope that someone here will be able to decipher the errors I see in
>Xcode debugger.

These were the errors you reported to see in Xcode debugger:

#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
 ?????? !defined(LIBRESSL_VERSION_NUMBER)
 ?????? #ifndef OPENSSL_NO_ENGINE
 ??????????????
ENGINE_load_builtin_engines();?????????????????????????????????? <--
Thread 8:
EXC_BAD_ACCESS (code=1, address=0x116)
 ?????????????? ENGINE_register_all_complete();
 ?????? #endif

Libssh2 does not need any engine, so it is safe to remove both
ENGINE_load_builtin_engines() and ENGINE_register_all_complete() by
applying this patch in src/openssl.h:
https://github.com/Jan-E/iSSH2/commit/6b2b61d56fc43642980aacc529c9d9d14263cebf#diff-47bf3a78aa165576c6c85a942ddf572bR1

Please recompile your libssh2.a after that patch and report back if the
app still crashes and what Xcode debugger reports then. It cannot be the
same as the message above, because those lines do not exist anymore.

-- 
Jan
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2019-08-13