From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD19448FF94 for ; Mon, 28 Sep 2026 09:40:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790588416; cv=none; b=uCiAsBMHDFreWETVR8I+vCPodjK+d6d73ozdxPEHOLvBccob4JN7NTgMUNCEhJdKst/TaJZ0ylcnmKJ6MvG+wN23EKK3hGuNfAefDzti7tvH2V7TYD0vyma8dKqdJ1NCuVx+IfnBB7wq03OluxF2JEx0QLShMlFzyICTbemiHMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790588416; c=relaxed/simple; bh=PkxvGC/Xf63cHvrRmH1J+ccYH697TYCc3VuAsARsz/o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=DJJaDum1pl4sf/F+/xiishrLhZ8f5E9Iyizqw7ukLKfU6WLgglbsXg2YihZv/d3vN78+PlvFV+rXyLkjE7VZsdc01ZeuQWJPJobWaPqtu5wS8SvOF2N/fL5BymVeZXI1XTOG9RdzjDje9NSUZ9cRiD0VZmq7BejQ+4mQ89iGDn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=CK+2MZAm; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=uiR6g7HJ; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="CK+2MZAm"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="uiR6g7HJ" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id B0EDCEC00EF; Mon, 28 Sep 2026 05:40:13 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-06.internal (MEProxy); Mon, 28 Sep 2026 05:40:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1790588413; x=1790674813; bh=AlWEay+8pa lssHx6y/jImbFBmAGZfNEM3Gzb8ktu/Cs=; b=CK+2MZAmv6/n5o2tjqU/I5+Xit fljQ7PZyTBGyiU+851s2s1gQN48ka1+V/44JBZPYSJJqY2/qQ6kGol7IOuvz+2xX t6tGBvc/2s/LgNF8leeAVZQUV0tQmgGvJtzckJWW5cLCLokoIuDyGMs4Q2XNiU+e /oIxT0oOn8/hdn7B+EsFO4NPpeA54dZsZ+Lkv0fBMtcVYIoDGMc3tQjooDfRrg9A D6dIoljBvrxq6fBIS9FARdLA2Qf89ZGdbboPO7hUHSnXYzZB/srLnXjUXxup4sZT l7UFfTAeqwjb25AfXrQPU9Hu9y0hN5u5LW4EuPR6+4OiHab13wzka6Dlp2fw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1790588413; x=1790674813; bh=AlWEay+8palssHx6y/jImbF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8q8zHn5UYKTw X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Sep 2026 05:40:12 -0400 (EDT) From: Junio C Hamano To: "D. Ben Knoble" Cc: git@vger.kernel.org, Eli Barzilay , Phillip Wood , Elijah Newren , Patrick Steinhardt , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Victoria Dye , Adam Johnson , Jeff King Subject: Re: [PATCH v3 5/5] builtin/stash: merge index in-core In-Reply-To: (D. Ben Knoble's message of "Sat, 26 Sep 2026 08:16:48 -0400") References: Date: Mon, 28 Sep 2026 02:40:10 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "D. Ben Knoble" writes: > + merge_incore_nonrecursive(&o, merge_base, head, merge, > + &result); > + > + oidcpy(&index_tree, &result.tree->object.oid); This is risky, isn't it? If there were catastrophic failure (e.g., missing object that were involved in the merge), merge_incore_nonrecursive() may stuff -1 to result.clean and return without populating result.tree, and when that happens, result.tree->object.oid would be dereferencing NULL.