From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 342213858D35; Tue, 6 Oct 2020 21:29:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 342213858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 8D7911E58E; Tue, 6 Oct 2020 17:29:34 -0400 (EDT) Subject: Re: Does "git bisect" work for anyone? To: "H.J. Lu" , Andreas Schwab , Joel Brobecker Cc: GDB , "H.J. Lu via Binutils" References: <87imbrhlhx.fsf@linux-m68k.org> From: Simon Marchi Message-ID: Date: Tue, 6 Oct 2020 17:29:34 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LOTSOFHASH, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 21:29:36 -0000 On 2020-10-03 9:57 a.m., H.J. Lu via Gdb wrote: > On Fri, Oct 2, 2020 at 11:27 PM Andreas Schwab wrote: >> >> On Okt 02 2020, H.J. Lu via Binutils wrote: >> >>> On master branch, I got >>> >>> $ git checkout d0e70c4189d5d6a6e63b85c1d3c10c74852173b4 >>> Previous HEAD position was 5a805384b83 asan: readelf buffer overflow and abort >>> HEAD is now at d0e70c4189d Automatic date update in version.in >>> $ git bisect good >>> $ git checkout fe07b5721a64a84e36ec63e15638b87655faf1bf >>> Previous HEAD position was d0e70c4189d Automatic date update in version.in >>> HEAD is now at fe07b5721a6 gdb/testsuite: Update test pattern in >>> ptype-on-functions.exp >>> $ git bisect bad >>> Some good revs are not ancestors of the bad rev. >> >> Git told you the reason. >> >> $ git rev-list d0e70c4189d5d6a6e63b85c1d3c10c74852173b4..fe07b5721a64a84e36ec63e15638b87655faf1bf | wc -l >> 0 > > How did this happen? Joel, shouldn't git commit hook check non-empty > forward and backward git rev-list outputs to support git bisect? What does that mean? How can you have both forward and backward rev-list non-empty? It's just that you got the revs backwards. By default, "good" must be older than "bad". If that's confusing, because you are investigating when a fix was introduced (and therefore, your "bad" is older than your "good"), you can change the terms to use something else than "good" and "bad". For example: $ git bisect start --term-old my_bad --term-new my_good $ git bisect my_bad fe07b5721a64a84e36ec63e15638b87655faf1bf $ git bisect my_good d0e70c4189d5d6a6e63b85c1d3c10c74852173b4 Bisecting: 115 revisions left to test after this (roughly 7 steps) [e148b73013109517c4d179aa9ae5a50b6d1dd5b5] libctf: drop error-prone ctf_strerror Simon