Subject: Re: libssh crash on Mac

Re: libssh crash on Mac

From: Leo <leo.r_at_rogers.com>
Date: Mon, 11 Mar 2019 06:32:51 -0400

Hi Peter,

Thank you for the prompt reply!

On 3/7/19 6:25 AM, Peter Stuge wrote:
> Leo wrote:
>> File: kex.c
> ..
>>             libssh2_sha1_update(fingerprint_ctx,
>> session->server_hostkey,  <-------------Thread 1: EXC_BAD_ACCESS
>> (code=1, address=0x0)
>>                                 session->server_hostkey_len);
> So you could either try to debug this, e.g. by outputing the values of
> session, session->server_hostkey and session->server_hostkey_len to a
> debug log, or..

The Xcode debugger output for these values is as follows:

successful connection:

session: 0x10288d400
fingerprint_ctx:
session->server_hostkey: ""
session->server_hostkey_len: 279

crash:

session: 0x102213400
fingerprint_ctx:
session->server_hostkey: ""
session->server_hostkey_len: 279

The only difference is the 'session' value. Frankly, I don't know what
that means and if it can help find what causes the crash in the second
project.

Do you have a better idea by any chance?

>> Some basic project details:
>>
>> libssh2-1.4.3
> ..you could just upgrade from this >6 year old version, and see if
> your bug has already been fixed.

I had to mention in my original post that it was my first thought, of
course.

I spent a week trying to include the latest version of libssh2 in my
Xcode project - but all attempts to compile, unfortunately, failed.

In a rare case that the project did compile, the app could only run on
the same machine - and crashed on others.

I looked up tons of info on the problems I experienced, as well as the
info on libssh2 implementation in Xcode in general. Still no luck.

After a week I had to give up on that, for now. I decided to first try
to solve the crash with libssh2-1.4.3, if possible - as at least it
compiles and does work in one app.

If I won't be able to solve this crash, then I'll post a separate
question regarding Xcode integration of the current version.

Sincerely,
Leo

_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2019-03-11