Bugs item #1560773, was opened at 2006-09-18 07:25
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1560773&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: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: Crash in curl_multi_perform on upload to 'file' errors
Initial Comment:
danil at mtsnet.ru
This happens with the next setup:
Platform: Win2000, mingw-2.95.2
libcurl: libcurl-7.15.4 and libcurl-7.15.6-20060911
+ssl builds downloaded from the official site
Libcurl crashes during 'multi' upload on Windows2000
if url points to the non-existing directory.
Simplified code abstract is below (it works when file
destination correct)
Regards,
Danil
#include <stdio.h>
#include <curl/curl.h>
const char* theData = "this is a test\n";
int hasNotBeenSent = 1;
int fRead(void *dataPtr, unsigned items, unsigned
size, void* whatever);
int main()
{
CURLSH *curlShare;
CURLM* multiHandle;
CURL* easyHandle;
CURLcode curlCode;
int isMultiRunning;
curl_global_init(CURL_GLOBAL_ALL );
easyHandle = curl_easy_init();
curl_easy_setopt( easyHandle, CURLOPT_
READFUNCTION, fRead);
curl_easy_setopt( easyHandle, CURLOPT_READDATA,
0);
curl_easy_setopt( easyHandle, CURLOPT_
INFILESIZE, strlen(theData) );
curl_easy_setopt( easyHandle, CURLOPT_URL, "file:
//e:\\NO_SUCH_DIR\file.txt");
curl_easy_setopt( easyHandle, CURLOPT_UPLOAD, 1);
multiHandle = curl_multi_init();
curl_multi_add_handle( multiHandle, easyHandle );
while(curlCode = curl_multi_perform(
multiHandle, &isMultiRunning ),
curlCode == CURLM_
CALL_MULTI_PERFORM) ;;;
printf("I can not get here\n");
curl_multi_remove_handle(multiHandle,
easyHandle);
curl_multi_cleanup(multiHandle);
curl_easy_cleanup(easyHandle);
curl_global_cleanup();
return 0;
}
int fRead(void *dataPtr, unsigned items, unsigned
size, void* whatever)
{
/* send the string one time */
return hasNotBeenSent ?
memcpy( dataPtr, theData, strlen(theData
)), hasNotBeenSent = 0, strlen (theData)
: 0 ;
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1560773&group_id=976
Received on 2006-09-18