curl-library
Re: bugs in sample C code for fopen (retry)
Date: Mon, 03 May 2004 09:27:01 -0700
I assume that I am passing sensible data because I am using the demo source
and it works if I comment out the first pass. I have posted a copy of my
modified source at
http://www.myownbusiness.org/tmp/fopen.c
if anyone wants to check it.
There is actually 2 versions of curl on the system, 7.9.5 and 7.11.2. The
sysadmin said that there were problems with upgrading the default curl on
system without upgrading the whole OS. Could this be causing the problem?
[mobi_at_catlow forums]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
[mobi_at_catlow forums]$ uname -a
Linux catlow.cyberverse.com 2.4.20-28.7 #1 Thu Dec 18 11:18:28 EST 2003 i686 unknown
[mobi_at_catlow forums]$ /w2/m/www.myownbusiness.org/curl/bin/curl -V
curl 7.11.2 (i386-redhat-linux-gnu) libcurl/7.11.2 OpenSSL/0.9.6b ipv6 zlib/1.1.4
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: IPv6 SSL libz NTLM Largefile
[mobi_at_catlow forums]$ curl -V
curl 7.9.5 (i386-redhat-linux-gnu) libcurl 7.9.5 (OpenSSL 0.9.6b) (ipv6 enabled)
Just to make sure that I have all my flags correct, here is the compile and run:
[mobi_at_catlow forums]$make fopen
gcc -g -c fopen.c
gcc -o fopen -g -L/w2/m/www.myownbusiness.org/curl/lib -lcurl -lssl -lcrypto -ldl fopen.o
chmod 755 fopen
[mobi_at_catlow forums]$./fopen
Step d8
Step d9
Done 11
Step d8
Segmentation fault (core dumped)
I am having problems getting gdb to read the core dump, so I don't have the
stack trace yet. I will post it up when it is available.
When should I post this to the bug page?
Thanks,
Dan
Daniel Stenberg wrote:
> On Mon, 3 May 2004, Dickerson wrote:
>
>>In the "fread" pass it dies when it calls url_fopen and tries to execute
>>the line:
>
>> while(curl_multi_perform(multi_handle, &file->still_running) ==
>>CURLM_CALL_MULTI_PERFORM );
>
>
>>and outputs:
>> Segmentation fault (core dumped)
>
>
> Hoa! This is indeed badness. Can you just verify that you pass in sensible
> data to libcurl here, and if you do, can you produce a stack trace from the
> core dump? (see docs/BUGS)
>
Received on 2004-05-03