git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] Makefile: use compat regex with SANITIZE=address
Date: Fri, 17 Jan 2020 09:37:22 -0800	[thread overview]
Message-ID: <xmqqr1zydlwt.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20200116175138.GA691238@coredump.intra.peff.net> (Jeff King's message of "Thu, 16 Jan 2020 12:51:38 -0500")

Jeff King <peff@peff.net> writes:

> Recent versions of the gcc and clang Address Sanitizer produce test
> failures related to regexec(). This triggers with gcc-10 and clang-8
> (but not gcc-9 nor clang-7). Running:
>
>   make CC=gcc-10 SANITIZE=address test
>
> results in failures in t4018, t3206, and t4062.
> ...
> We can work around that by having the preprocessor replace regexec with
> git_regexec (both in the callers and in the actual implementation), and
> we truly end up with a call to our custom regex code, even when
> compiling with ASan. That's probably a good thing to do anyway, as it
> means anybody looking at the symbols later (e.g., in a debugger) would
> have a better indication of which function is which. So we'll do the
> same for the other common regex functions (even though just regexec() is
> enough to fix this ASan problem).
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  Makefile             | 3 +++
>  compat/regex/regex.h | 5 +++++
>  2 files changed, 8 insertions(+)

I guess we should treat this the same way as the recent vcproj "fix"
by Dscho, i.e. fast-track to 'maint' to ensure that all public
integration branches has it soonish?

Thanks.

  parent reply	other threads:[~2020-01-17 17:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 17:51 [PATCH] Makefile: use compat regex with SANITIZE=address Jeff King
2020-01-16 18:34 ` [PATCH] t4018: drop "debugging" cat from hunk-header tests Jeff King
2020-01-16 22:56   ` Jonathan Nieder
2020-01-17 17:37 ` Junio C Hamano [this message]
2020-01-17 17:49   ` [PATCH] Makefile: use compat regex with SANITIZE=address Jeff King
2020-01-17 23:39     ` brian m. carlson
2020-01-18  3:34       ` Jeff King

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=xmqqr1zydlwt.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=peff@peff.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).