curl-library
Re: Segfault with CURLOPT_STDERR (was: How to use CURLOPT_DEBUGFUNCTION with Perl)
Date: Wed, 26 May 2004 16:38:54 +0200
Hello Daniel,
On Wed, May 26, 2004 at 03:58:42PM +0200, Daniel Stenberg wrote:
> On Wed, 26 May 2004, Jan Theofel wrote:
>
> > Here's the output although I think it won't help very much:
> >
> > (gdb) frame 1
> > #1 0x403178c7 in Curl_infof (data=Variable "data" is not available.
> > ) at sendf.c:138
> > 138 sendf.c: No such file or directory.
> > in sendf.c
>
> I would be interested in what the local variables in that frame contain. It
> should basicly be 'data' and the generated buffer (print_buffer). What source
> line is 138? Is that the first one that uses 'data'? If so, it would indicate
> that 'data' points to something illegal! If that is the case, then we need to
> chase down something that destroys memory...
void Curl_infof(struct SessionHandle *data, const char *fmt, ...)
{
if(data && data->set.verbose) {
va_list ap;
char print_buffer[1024 + 1];
va_start(ap, fmt);
vsnprintf(print_buffer, 1024, fmt, ap);
va_end(ap);
** Curl_debug(data, CURLINFO_TEXT, print_buffer, strlen(print_buffer));
}
}
Line 138 it marked with **
cURL version is 7.11.2
> > If I understand that correct, the gdb need the source files for that but
> > doesn't find them. Where do I find the connect.c to add this path with the
> > -d option to gdb? The file seems neither to be be in the sources of curl nor
> > in the sources of the WWW::Curl::easy module.
>
> Those are source files in libcurl. See curl-[version]/lib.
Good, using this with -d results in:
(gdb) frame 1
#1 0x403178c7 in Curl_infof (data=Variable "data" is not available.
) at sendf.c:138
138 Curl_debug(data, CURLINFO_TEXT, print_buffer, strlen(print_buffer));
Bye,
Jan
-- Jan Theofel Fon: +49 (7 11) 48 90 83 - 0 ETES - EDV-Systemhaus GbR Fax: +49 (7 11) 48 90 83 - 50 Libanonstrasse 58 A * D-70184 Stuttgart Web: http://www.etes.deReceived on 2004-05-26