curl-library
Re: Segfault with CURLOPT_STDERR (was: How to use CURLOPT_DEBUGFUNCTION with Perl)
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 26 May 2004 17:10:23 +0200 (CEST)
Date: Wed, 26 May 2004 17:10:23 +0200 (CEST)
On Wed, 26 May 2004, Jan Theofel wrote:
> 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));
> }
> }
That looks totally crazy to me. Can you rebuild libcurl without any -O options
(and only -g) to see if you get a different source line? It seems soooo
unlikely that it would ever crash on that line, no matter what happened.
What does 'print_buffer' contain at crash time?
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-05-26