cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1779751 ] libcurl crashes uploading with multiple protocols

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 22 Aug 2007 15:49:35 -0700

Bugs item #1779751, was opened at 2007-08-22 22:15
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1779751&group_id=976

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: libcurl
Group: crash
Status: Open
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: -dep- (phaedra7)
Assigned to: Daniel Stenberg (bagder)
Summary: libcurl crashes uploading with multiple protocols

Initial Comment:
I have an app that uses libcurl to upload files via 'ftp://' or 'file://'. Sending multiple files in sequence works fine as long as they are all using the same protocols. Alternating protos will cause a crash. In particular using ftp after file causes the crash.

This can be tested using the 'curl' command line prog.

Do something like this...

curl -T filea.c file:///put/this/somewhere/filea.c -T fileb.c ftp://ftp.myserver.com/files_go_here/fileb.c

I have been able to reproduce the crash on both Linux and Solaris using various version of curl/libcurl totally outside of my app.

You should get a crash using the latest version, 7.16.4.

I have a Slackware Linux box with curl/libcurl 7.15.5 preinstalled. This version works. Building the latest version of curl/libcurl on that box does NOT work.

On a Solaris 9 Sparc box using the prebuilt 'Blastwave' curl/libcur 7.16.3 doesn't work. I've built 7.16.2 and 7.16.4 and neither of those work. Reverting to 7.15.5 (the same as the preinstalled version on my Linux box) DOES work.

So I think somewhere after 7.15.5 this problem was introduced.

Relinking my app with libcurl from 7.15.5 fixes the crash.

Thanks.

-dep-

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

>Comment By: Daniel Stenberg (bagder)
Date: 2007-08-23 00:49

Message:
Logged In: YES
user_id=1110
Originator: NO

I've now committed a fix in CVS that made the valgrind complaint go away
for me. Please try the next (20070823) snapshot and see if it did the same
for you!

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

Comment By: Daniel Stenberg (bagder)
Date: 2007-08-22 23:57

Message:
Logged In: YES
user_id=1110
Originator: NO

Ah yes, valgrind complains for me as well (but the command still works)...
I'll dig into it!

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

Comment By: -dep- (phaedra7)
Date: 2007-08-22 23:51

Message:
Logged In: YES
user_id=1873445
Originator: YES

I just tried the latest daily snapshot, curl-7.17.0-20070822, and it
didn't fix the problem for me. I did build on both Linux and Solaris. Both
fail. Running under 'valgrind' on Linux it shows that it crashes in ftp.c,
line 172, rtn freedirs(). Same place as with v16.4 (different line as the
source has changed). I haven't looked at it real close and I'm sorta
guessing at the moment but it seems to have something to do with the 'union
proto' in structure HandleData. Although the code for v15.5 which works
doesn't look all that much different. I'll do some more poking around
tomorrow.

-dep-

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

Comment By: Daniel Stenberg (bagder)
Date: 2007-08-22 22:54

Message:
Logged In: YES
user_id=1110
Originator: NO

I can confirm that when I try this with curl 7.16.4 as it comes in debian
unstable it segfaults.

However, when I try this with the current CVS code it works just fine!

Can you please try the current CVS/daily snapshot and see if you still
experience this problem?

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1779751&group_id=976
Received on 2007-08-23

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET