curl-library
Re: Crash in curl
Date: Fri, 15 Feb 2008 15:37:23 -0800
It sounds to me like you were right in your diagnosis of memory
corruption from your main program (:
If it works on another version of the library that could even be more
evidence of that. A lot of times memory corruption bugs go undetected
because they don't over-write memory that's very important so you dont
have crashes etc.
With the version of the library that your code doesn't crash on, the
location of things in memory is surely different so your mem
corruption could still be happening, but just not over-writing
anything important.
hunting mem corruption bugs is a little difficult though, i've done it
once or twice but im not good enough to give you any decent tips :P
On 2/15/08, Andreas Volz <lists_at_brachttal.net> wrote:
> Hello,
>
> I get a crash sometimes when calling curl_easy_perform() from my
> application. Not sure why it happens. Maybe it's a memory overwrite
> from my application, because my download function works everytime from
> my unit tests. But it fails in the real application. See here the
> backtrace:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1242409280 (LWP 22663)]
> Curl_http_done (conn=0x83670b8, status=CURLE_OK, premature=false)
> at http.c:1615
> 1615 http.c: No such file or directory.
> in http.c
> Current language: auto; currently c
> (gdb) bt
> #0 Curl_http_done (conn=0x83670b8, status=CURLE_OK, premature=false)
> at http.c:1615
> #1 0xb72c8f8d in Curl_done (connp=0xbf877c14, status=CURLE_OK,
> premature=false) at url.c:4245
> #2 0xb72d5d76 in Curl_perform (data=0x8277c00) at transfer.c:2451
> #3 0xb72d655d in curl_easy_perform (curl=0x8277c00) at easy.c:492
> ...
>
> > curl-config --version
> libcurl 7.16.4
>
> I search the problem for some hours without success. Any ideas why curl
> crash at this point? This may help me to localize the problem in my
> application.
>
> The really interesting thing is that my application works on a second
> Linux system with curl-7.17.1 installed. So maybe it's a curl problem?
>
> regards
> Andreas
>
Received on 2008-02-16