Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2021 15:31:38 +0200
From:      =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= <fernape@freebsd.org>
To:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Regular expression compilation fail in current
Message-ID:  <CAGwOe2bwyLihdOzyxVYgdaSUTwGzELANARSh=HGQoou=5FgG%2Bg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi there,

I'm working with this port PR
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255182

and the problem seems to boil down to a regular expression that does
not compile on current but it does in 12.2.

The minimum repro is this one:

#include <regex.h>
#include <stdio.h>

int
main()
{
        regex_t regexp;
        int ret = regcomp(&regexp, "\\s*", REG_EXTENDED | REG_ICASE |
REG_NOSUB);
        if ( ret != 0) {
                printf("regexp compilation failed: %d\n", ret);
        }

        return 0;
}

This one works in 12.2 but fails to compile the regexp in FreeBSD
14.0-CURRENT #11 main-n245984-15221c552b3c with error 5 REG_EESCAPE
`\' applied to unescapable character.

Any help is appreciated.

Thanks!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGwOe2bwyLihdOzyxVYgdaSUTwGzELANARSh=HGQoou=5FgG%2Bg>