Bugs item #2876542, was opened at 2009-10-11 18:23
Message generated for change (Settings changed) made by bagder
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2876542&group_id=125852

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: API
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Juzna (juzna)
>Assigned to: Daniel Stenberg (bagder)
Summary: poll() and accept() segmentation fault

Initial Comment:
I'm using ssh2 module in PHP, and this module uses libssh2. When trying libssh2 
version that comes in my distribution, poll a accept calls did deadlock and 
never finished. When trying git version, it did seg fault.

I've fixed the seg fault problem (in packet.c there was forgotted to assign 
value to listen_state->channel, which caused to write to null pointer) and 
partially also deadlock problem (in channel.c). It work's now only for 
non-blocking calls, someone who understand it better could fix it.

In channel_forward_accept(), the do-while is trying to read data from transport 
layer and when it reads all, it gots PACKET_EAGAIN error which causes to stop 
reading data and return. So it will never try to accept the connection. (at 
least I think so).

Sorry for problems, but it's my first patch made ever so I'm not sure whether 
I'm doing it correctly. And I also dont know how to commit changes to git, so 
I'm posting it here.
If someone wanna give me some advices about how to commit patches, I'd be glad. 
You can use my email juzna.cz at gmail dot com

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2009-10-18 03:43

Message:
Thanks for your report and help in improving libssh2!

A fix has just been committed to the source code repo, this case is now
considered fixed and closed!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2876542&group_id=125852
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to