From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id E68933851C2E; Sat, 3 Oct 2020 13:58:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E68933851C2E Received: by mail-oi1-x22e.google.com with SMTP id t77so657548oie.4; Sat, 03 Oct 2020 06:58:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UTlxG7dluN4QBklUkup0VZfGq0f21a+wDbQZ2IBQGss=; b=uUb3MtFdnZ3fPbpdMfa5m9AHVCoCP2iZS25Sxqrmnb5zQAnqhTHS/xf3UGDCuaBASs e0f6tfsXjtuOrjcpNHTEcBIeG9X4fFaU78ygjSEBqGVzlutPKB4jVKRCSI+PdTEEZVvG gx5O7iziBRdi+XSViTki3uAW1ehZyuOgi4DPACphfh7iwBMFNeXHVwnDQozQH8DSgXCV SoKyl335x14hSRDZSx6g1FGA7pCMdAwZcdYlMD5ZxF8vUQ/6CDK/wGDFZwTwetVaLQ37 I6PJDWrLdg18iYDcjWJVt3D5lDAnqKrgKysXz6tewF1bdwxDm3fFH2UTKuSEzjfCFE/+ gc7g== X-Gm-Message-State: AOAM530FBctX45LNiG2sKMG9PiXYL42WV9Chln+COoggY6UrvaQAB8mH yIqHhBghwaAoeaGOXFOvvlVb2fpgTM8/IMvOrei+szWYVXQ= X-Google-Smtp-Source: ABdhPJwb1CNBvn9qq1A/P6EO2ThpwgEjtH6z2VSG7ASmQ84nkDfgOT1eBItBvGVZ15KsIjKiQvWKOMyQ0e+Ro4XcJpg= X-Received: by 2002:aca:5605:: with SMTP id k5mr3813870oib.25.1601733483035; Sat, 03 Oct 2020 06:58:03 -0700 (PDT) MIME-Version: 1.0 References: <87imbrhlhx.fsf@linux-m68k.org> In-Reply-To: <87imbrhlhx.fsf@linux-m68k.org> From: "H.J. Lu" Date: Sat, 3 Oct 2020 06:57:26 -0700 Message-ID: Subject: Re: Does "git bisect" work for anyone? To: Andreas Schwab , Joel Brobecker Cc: "H.J. Lu via Binutils" , GDB Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3032.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Sat, 03 Oct 2020 13:58:05 -0000 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? > $ git rev-list fe07b5721a64a84e36ec63e15638b87655faf1bf..d0e70c4189d5d6a6e63b85c1d3c10c74852173b4 | wc -l > 232 > > > git bisect cannot work properly in this case. > > Maybe you mistook good and bad revs? > > If you want to find the commit where an issue is fixed, you need to mark > the commits that don't have the issue as bad and the the ones that have > the issue as good. > -- H.J.