Replacing libgnuregex

Kyle Evans kevans91 at ksu.edu
Fri Apr 14 22:28:37 UTC 2017


(apologies, wrong email, resending for list)


On Apr 14, 2017 3:41 PM, "Kyle Evans" <kevans91 at ksu.edu> wrote:

On Fri, Apr 14, 2017 at 3:24 PM, Pedro Giffuni <pfg at freebsd.org> wrote:
>
> That doesn't seem good: anything that breaks tests is very likely to have
> other side-effects.
> Keep in mind that any regex change will likely have to go through a ports
> exp-run and
> ports will still have to work fine in three versions of FreeBSD.
>

Yeah, I anticipate other side-effects from this. Fortunately, there aren't
many ports relying on GNU extensions, and as a part of [1] I'm trying to
get them to start using textproc/gnugrep since this is more up-to-date and
well-tested.

As far as sed goes, the only potential breakage should come from \<, \>,
\b, \B, \w, \W, \s, and \S expecting to be ordinary. This is easy to fix in
a way that is actually POSIX compliant (unlike expecting them to be
ordinary), so no worries there.

It's worth noting that I have absolutely no intention of changing anything
to actually expect GNU extensions, but I tend to use them myself in my own
daily grep(1) usage- some of them are nice to have.


>
On second thought, I should add a REG_POSIX flag so that we can make sure
to maintain POSIX compatibility instead of removing the tests with
expectations that cannot hold. I think it should be opt-in though for the
sake of, say, gdb, which expects GNU extensions.

I do still intend to fix the regressions that occur because of undefined
behavior, though.


More information about the freebsd-hackers mailing list