From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: regcomp regression?
Date: Wed, 15 Oct 2014 21:03:06 -0400 [thread overview]
Message-ID: <20141016010306.GU32028@brightrain.aerifal.cx> (raw)
In-Reply-To: <543EE0A5.2000905@sholland.net>
On Wed, Oct 15, 2014 at 04:01:25PM -0500, Samuel Holland wrote:
> Hello,
>
> I've been rebuilding packages after the 1.1.5 release, and it's caused
> some (apparent) regressions. file no longer compiles as it is unable to
> parse one of its magic files. The offending regex is (windows, line 163)
>
> \\`(\r\n|;|[[]|\xFF\xFE)
>
> It's testing for the BOM at the beginning of an INI/INF file. I
> understand the regex rewrite removed[1] the ability to match arbitrary
> bytes (even with the C locale) because it was broken; is this something
> you plan to add back? Or is the application wrong? If so, what
> workaround do you suggest?
It was not supported before either; it was just silently misprocessed
as if the regex were:
\\`(\r\n|;|[[]|)
Obviously this was undesirable. The fixes made to the parser caught
this bug. I think there's a patch for file upstream already, but it
does not really fix the bug; it just makes the symptom go away again.
The problem is that they're attempting to use regex to process binary
data, which is not a valid usage.
If we add the controversial byte-based C locale that's been discussed,
this could be made to work, but that's still an open question whether
it will be done. It adds a good deal of ugliness and code duplication
to the codebase.
Rich
next prev parent reply other threads:[~2014-10-16 1:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 21:01 Samuel Holland
2014-10-16 1:03 ` Rich Felker [this message]
2014-10-16 1:12 ` Szabolcs Nagy
2014-10-16 1:43 ` Samuel Holland
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=20141016010306.GU32028@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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).