Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/build] Hardcode --with-included-regex
Date: Mon, 19 Apr 2021 13:47:35 -0600	[thread overview]
Message-ID: <87k0oycazs.fsf@tromey.com> (raw)
In-Reply-To: <20210413153447.GA21719@delia> (Tom de Vries's message of "Tue, 13 Apr 2021 17:34:49 +0200")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> A note on the latter: it's actually a bug to compile a regex using regcomp and
Tom> then pass it to re_search.  The GNU regex interface requires one to use
Tom> re_compile_pattern or re_compile_fastmap.  But as long we're using one of the
Tom> GNU regex incarnations in gnulib, glibc or libiberty, we get away with this.

Tom> The PR could be fixed by adding -lc in a specific position in the link line,
Tom> to force regcomp to be bound to glibc.  But this solution was considered
Tom> in the discussion in the PR as being brittle, and possibly causing problems
Tom> elsewhere.

Tom> Another solution offered was to restrict regex usage to posix, and no longer
Tom> use the GNU regex API.  This however could mean having to reproduce some of
Tom> that functionality locally, which would mean maintaining the same
Tom> functionality in more than one place.

Just to be clear, using the GNU extensions isn't currently done, I
think.  I'd like to use them so GDB can avoid copying some strings to
ensure they are \0-terminated; but this isn't done at the moment.

So, it would also be equivalent, right now, to switch GDB to conform to
POSIX here.

Personally I'm fine with just requiring the libiberty regexp.
That said we should probably see if there are differing opinions, or
some reason to keep the flag.

thanks,
Tom

  reply	other threads:[~2021-04-19 19:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 15:34 Tom de Vries
2021-04-19 19:47 ` Tom Tromey [this message]
2021-04-19 20:33   ` tdevries
2021-04-21 16:59     ` Tom Tromey

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=87k0oycazs.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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