curl-library
Re: curl_formadd producing page faults on some computers and not others!?!! help!
Date: Mon, 10 Dec 2001 23:58:16 +0100 (MET)
On Mon, 10 Dec 2001, Timothy B. Ward wrote:
> I'm running all this on the win32 platform and the oddity here is that
> the program functions perfectly on some machines and yields a page fault
> on a set of 30 laptops I'm supporting.
I think this happens because of some dangling pointer of yours or that you
have something that have munched on some memory block somewhere.
I've attached my version of your test program. I ran it in a loop a couple of
hundred times like this (against the curl test suite's perl http server):
#!/bin/sh
a="start string with this" # initial post string
while /bin/true; do # loop forever
./formprob "$a" # call test program with string to post
a="addmore $a" # prepend a string
done # loop
... it just works.
> This code is copied from an example I found somewhere, and it works
> flawlessly on most machines. The code in question is:
[snip]
> curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME,
> "name",CURLFORM_COPYCONTENTS, pszBuffer, CURLFORM_END);
Is the data pszBuffer is pointing to *really* zero terminated?
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
- TEXT/PLAIN attachment: formprob.c