Subject: Re: keyboard-interactive method gives access violation in MSVC 2008

Re: keyboard-interactive method gives access violation in MSVC 2008

From: Ezequiel Ruiz <eruiz_at_barcelona04.com>
Date: Mon, 06 Sep 2010 15:32:51 -0300

  I've compiled the release DLL but changed some parameters, now I can
obtain some extra info.
The exact line where the error happens is line 1588 in userauth.c:

Although "session->userauth_kybd_responses" is not a bad pointer (I can
see the right password in the text variable, and the apropiate length) ,
it returns the access violation when calling LIBSSH2_FREE for that
object (line 1588). The text was allocated by using _strdup, and not
deleted at all, I've also tried with _malloc (which is the same).
I've seen that the LIBSSH2_FREE means "session->free((ptr),
&(session)->abstract)". So, after calling this method, the code hangs at
line 51 of free.c (in MSVC implementation...), which is part of the
function void __cdecl _free_base (void * pBlock). The exact line is:
         retval = HeapFree(_crtheap, 0, pBlock). So, the question is:
Why is the debug target working OK?. I don't know what else we may
extract from the debugger at this point. But I recognize I don't know
the internal architecture of libssh2 at all, so perhaps I'm not
researching in the right place.

If you still want the solution, I may prepare a zip for you.

Regards,

Ezequiel

El 06/09/2010 02:19 p.m., Alexander Lamaison escribió:
> On 6 September 2010 18:13, Ezequiel Ruiz<eruiz_at_barcelona04.com> wrote:
>> mm, the exact error message is:
>>
>> Unhandled exception at 0x77d6e1fe in Test.exe: 0xC0000005: Access violation
>> reading location 0x44ed6d96.
>>
>> The Test.exe is just an exe creating an instance of this class, and calling
>> the open() method.
> If you zip up a VS solution for this Test.exe, I'll try to debug it.
>
> Alex
>
> --
> Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-09-06