From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 729AC1F542 for ; Wed, 14 Jun 2023 01:41:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233075AbjFNBlW convert rfc822-to-8bit (ORCPT ); Tue, 13 Jun 2023 21:41:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231490AbjFNBlV (ORCPT ); Tue, 13 Jun 2023 21:41:21 -0400 Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40C3C1AD for ; Tue, 13 Jun 2023 18:41:20 -0700 (PDT) Received: by mail-qv1-f41.google.com with SMTP id 6a1803df08f44-62ddb103debso13884846d6.1 for ; Tue, 13 Jun 2023 18:41:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686706879; x=1689298879; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tBDkvM1JsvBB/f0PLMe33WVkCUc2c+cPRuzqV1uEW+E=; b=GLV9LlRFx1+LbLKEHiEA8wvy6oIbBYeojHG+ckQfneNvKwHtPCZVz/mw7tDu8mQ3m+ 0Tm2zB6SWd2SBBjT1edd/KywSm/1a4llfS1QMR9YeF+7Uyk36fUI4tEGyHg4t9AQfEGu ZaFNmlupo4udUhinfq9OtnJ8mtANi2kgQW99MolPIqQH2WpkAHdPvVWsgXSd9yPjh0LJ QvZ5hWeD/m57uqX2Emc6ienICvqTEAdHh/tJLG1R+4CaPKypvQOc+PYLcbk6jFwI8sES uKBLioP1n4LVQxa9rE2vZ8x7bavP+SFk6LSnvIM+MQgsiq4LHk+N0rQqJ9AEfip4xolt aakw== X-Gm-Message-State: AC+VfDzQUY1Mo84ZgWRaegL/d8jKf/7hvWxuDA1ZRl0iPBMfittpYQVW M8LVEn2ljmgt9s548Ek53fwhyrZvcjpRLLZ3EOI= X-Google-Smtp-Source: ACHHUZ60uJN4TeAUFErBnZ8Mk/aCJ1Pye83qYm/JUf/EcaNOCrDqduUUNEeTxuJGd6iLjyqJ5oc1Nh6W6OyvgPQnSbE= X-Received: by 2002:a05:6214:e48:b0:629:78ae:80e3 with SMTP id o8-20020a0562140e4800b0062978ae80e3mr17027427qvc.24.1686706879222; Tue, 13 Jun 2023 18:41:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Eric Sunshine Date: Tue, 13 Jun 2023 21:41:08 -0400 Message-ID: Subject: Re: [PATCH v9 4/6] notes.c: introduce '--separator=' option To: Junio C Hamano Cc: Teng Long , avarab@gmail.com, git@vger.kernel.org, tenglong.tl@alibaba-inc.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Jun 13, 2023 at 9:02 PM Junio C Hamano wrote: > This step seems to break CI asan/ubsan job > https://github.com/git/git/actions/runs/5260417146/jobs/9507299904#step:4:1826 > Perhaps something like this is in order? > > diff --git c/builtin/notes.c w/builtin/notes.c > @@ -239,7 +239,7 @@ static void write_note_data(struct note_data *d, struct object_id *oid) > static void append_separator(struct strbuf *message) > { > - if (separator[strlen(separator) - 1] == '\n') > + if (*separator && separator[strlen(separator) - 1] == '\n') Is this the same issue Peff reported[1]? His proposed solution was a bit different. [1]: https://lore.kernel.org/git/20230519005447.GA2955320@coredump.intra.peff.net/