[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash on windows in ssh_message_get()


From your stack trace, I first noticed msvcrt.dll!free and that led me to believe it was a problem of that kind. malloc() and free() do different memory checks in debug (msvcrtXXd.dll) and release (msvcrtXX.dll) versions. An attempt to mix both libraries in the same executable might cause an access violation.

After a closer look in your stack trace, I noticed that your program stop is caused by a SIGTRAP (my original hypothesis would be confirmed by a SIGSEGV). This means one checking inside free() has failed. Could be a double free() or a pointer that hasn't been returned directly by malloc() or the actual pointer might have been overwritten due to an overflow.

I believe the next step is to place a breakpoint at E:\libssh-0.5.1\src\dh.c:179 (/break dh.c:179/) and then step (/n/) the execution.

    Regards,

        Paulo

On 11/08/11 10:24, voker57 wrote:
On Wed, Aug 10, 2011 at 07:42:12PM -0300, Paulo Panhoto wrote:
    This seems to be a case where debug and release builds are mixed. More
    likely Release DLL with Debug executable.
Can you please elaborate on that? The only executable I'm using is test program
I compile, OpenSSL is 1.0.0d pre-compiled version from
http://www.slproweb.com/products/Win32OpenSSL.html, libssh is built with debug.



References:
Crash on windows in ssh_message_get()voker57 <voker57@xxxxxxxxx>
Re: Crash on windows in ssh_message_get()Andreas Schneider <asn@xxxxxxxxxxxxxx>
Re: Crash on windows in ssh_message_get()voker57 <voker57@xxxxxxxxx>
Re: Crash on windows in ssh_message_get()Andreas Schneider <asn@xxxxxxxxxxxxxx>
Re: Crash on windows in ssh_message_get()Paulo Panhoto <paulo.panhoto@xxxxxxxxx>
Re: Crash on windows in ssh_message_get()voker57 <voker57@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org