curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: segfault in Curl_conncache_remove_conn with 7.49.1

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 18 Nov 2017 01:34:34 +0100 (CET)

On Fri, 17 Nov 2017, Eric Ridge via curl-library wrote:

> I guess I'm wondering what might cause this? My app is single-threaded and
> my usage pattern is that I init curl once on startup (and set
> non-request-specific CURLOPTs at this time) and just re-use it throughout
> the lifetime of the app.

Really hard to tell. I can't recall any bugs fixed recently like that.

> I did notice a little bug in my code where I was setting CURLOPT_ERRORBUFFER
> to an allocated char * that happened to get free'd later on, so that's no
> good, but I can't decide if that would cause this crash in libcurl.

Hm, well if libcurl would then get an error it would write to the
CURLOPT_ERRORBUFFER area that is then freed and possibly reused for another
purpose and that would be really bad, but your stack trace doesn't really look
like it was a problem like that. Although we can't rule it out.

> I haven't been able to re-produce this for the past few days (even with the
> above bug in my code still around), so it's kinda hard to figure out if I've
> fixed it or not. :)

Without more clues on how you trigger this crash, I'm not sure I can do much
more right now. :-/

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-11-18