cURL / Mailing Lists / curl-library / Single Mail

curl-library

Known problems with simple formadd and curl_formfree?

From: Max L. Eidswick <max_at_redpawz.com>
Date: Sun, 13 Jan 2008 12:40:12 -0700

I am testing the curl library for our next product release using curl-7.17.1 - periodically, I am getting a protection violation in
the curl_easy_perform module after a curl_formfree call.

This is a simple ping test, but I wanted to be clear that the form is allocated in the libcurl and should be freed before the form
field name/value contents can be changed.

Am I misunderstanding the call or are there any known issues with repeated called to formadd/formfree over time? It happens
randomly over several thousand pings (calls to easy perform).

Thanks and regards,

Max (formdata snippet and call stack follow)

The call stack goes into the memcpy called from formdata module:

  do {

    if( (form->data->length - form->sent ) > wantedsize - gotsize) {

      memcpy(buffer + gotsize , form->data->line + form->sent,
             wantedsize - gotsize);

      form->sent += wantedsize-gotsize;

      return wantedsize;
    }

    memcpy(buffer+gotsize,
           form->data->line + form->sent,

----- call stack follows -----

        RedPawComms.exe!memcpy(unsigned char * dst=0x00dab2fd, unsigned char * src=0xfeeefeee, unsigned long count=16384) Line 233
Asm
> RedPawComms.exe!Curl_FormReader(char * buffer=0x00dab2fd, unsigned int size=1, unsigned int nitems=16384, _iobuf *
mydata=0x00da2ec8) Line 1436 + 0x22 bytes C
         RedPawComms.exe!Curl_fillreadbuffer(connectdata * conn=0x011ecfe0, int bytes=16384, int * nreadp=0x010dfc10) Line 131 +
0x27 bytes C
         RedPawComms.exe!Curl_readwrite(connectdata * conn=0x011ecfe0, unsigned char * done=0x010dfd2f) Line 1419 + 0x15 bytes C
         RedPawComms.exe!Transfer(connectdata * conn=0x011ecfe0) Line 1872 + 0xd bytes C
         RedPawComms.exe!Curl_perform(SessionHandle * data=0x00da6ea0) Line 2442 + 0x9 bytes C
         RedPawComms.exe!curl_easy_perform(void * curl=0x00da6ea0) Line 498 + 0x9 bytes C
         RedPawComms.exe!RPComms_PingCheck(void * lpParam=0x0012fd7c, int bTimerOrWait=1) Line 817 + 0xb bytes C
         ntdll.dll!7c927911()

-----
 
Max L. Eidswick, Red Paw Systems, Inc.
1 (866) RED-PAWZ (1-866-733-7299) extension 256
www.RedPawz.com or Shop.RedPawz.com
 
1. You shouldn't have to worry about PC backups
2. The BackupBox does it for you, all the time, automatically
3. When you need it, it is there - restore everything in hours not days.
So Simple It Gets Used!
 

Proud Sponsors of the Champ Car World Series and Rocket Sports Racing!
 
This e-mail and any files transmitted with it are confidential and Red Paw Systems, Inc. proprietary, intended solely for the use of
the addressee(s) named above. If you have received this message in error, please advise the sender by immediate reply and delete
this e-mail from your system. If you are not the intended recipient, you are notified that disclosing, copying, distributing or
taking any action in reliance on the contents of the information contained in this e-mail or any attachment is strictly prohibited.
Since e-mail messages and their attachments may contain viruses, the recipient should check this e-mail and any attachments for
viruses. While the company has taken reasonable precautions to ensure no viruses are present in e-mails originating from the
company, the company does not accept liability for any loss or damage arising from this e-mail transmission.
 
 
 
Received on 2008-01-13