All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: git@vger.kernel.org
Cc: Nick Hengeveld <nickh@reactrix.com>
Subject: Re: http-fetch segfault fix?
Date: Wed, 07 Jun 2006 01:41:54 -0400	[thread overview]
Message-ID: <1149658914.5648.5.camel@dv> (raw)
In-Reply-To: <7vlks9le8b.fsf_-_@assigned-by-dhcp.cox.net>

On Tue, 2006-06-06 at 22:35 -0700, Junio C Hamano wrote:
> Pavel Roskin <proski@gnu.org> writes:
> 
> > It's a different backtrace this time.  abort_object_request() has this code:
> >
> > if (obj_req->slot) {
> >      release_active_slot(obj_req->slot);
> >      obj_req->slot = NULL;
> > }
> >
> > Apparently just because obj_req->slot is not NULL doesn't mean it's a
> > valid pointer.  I'm going to use Valgrind now.
> 
> Nick's one-liner to explicitly initialize newreq->slot to NULL
> looks obviously correct to me.  Does it fix this problem for
> you?

I'm going to leave the tests running overnight, both with and without
USE_CURL_MULTI.

The Valgrind diagnostics confirms that obj_req->slot is not initialized
(as opposed to being a pointer to a freed area or something else):

==27182== Conditional jump or move depends on uninitialised value(s)
==27182==    at 0x4070EA: abort_object_request (http-fetch.c:1059)
==27182==    by 0x4071CE: fetch_object (http-fetch.c:1078)
==27182==    by 0x4073EC: fetch (http-fetch.c:1126)
==27182==    by 0x403125: loop (fetch.c:180)
==27182==    by 0x403369: pull (fetch.c:248)
==27182==    by 0x407A13: main (http-fetch.c:1271)

Line 1059 is:
if (obj_req->slot) {

-- 
Regards,
Pavel Roskin

  reply	other threads:[~2006-06-07  5:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.0606052002530.5498@g5.osdl.org>
2006-06-06  6:02 ` New release? Junio C Hamano
2006-06-06  8:30   ` Johannes Schindelin
2006-06-06 10:27     ` Junio C Hamano
2006-06-06 12:42       ` Johannes Schindelin
2006-06-06 15:20         ` Junio C Hamano
2006-06-06 16:08   ` Jon Loeliger
2006-06-06 17:15     ` Junio C Hamano
2006-06-06 17:58       ` Jon Loeliger
2006-06-06 16:19   ` Pavel Roskin
2006-06-06 16:46     ` Nick Hengeveld
2006-06-06 18:38       ` Pavel Roskin
2006-06-07  5:35         ` http-fetch segfault fix? Junio C Hamano
2006-06-07  5:41           ` Pavel Roskin [this message]
2006-06-07  5:58             ` Junio C Hamano
2006-06-07 14:29               ` Pavel Roskin
2006-06-07 15:32                 ` Nick Hengeveld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1149658914.5648.5.camel@dv \
    --to=proski@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=nickh@reactrix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.