Summary: | usr.bin/sed: Bug involving "\<". | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Pedro F. Giffuni <pfg> | ||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | avg | ||||
Priority: | --- | Keywords: | patch | ||||
Version: | CURRENT | Flags: | pfg:
mfc-stable10+
|
||||
Hardware: | Any | ||||||
OS: | Any | ||||||
See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209387 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195929 |
||||||
Attachments: |
|
Description
Pedro F. Giffuni
![]() ![]() Created attachment 170076 [details]
Fix (from OpenBSD)
The fix based on the porting on the OpenBSD list, goes on top of r299211.
The complementary regex fix is here: https://reviews.freebsd.org/D6257 And for the record this is the offending code: https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/isl/isl_format_layout_gen.bash This is all currently being revisited in OpenBSD (where it came from), and they are finding other bugs in the process. A commit references this bug: Author: pfg Date: Wed May 25 15:42:39 UTC 2016 New revision: 300684 URL: https://svnweb.freebsd.org/changeset/base/300684 Log: sed: convert sed to use REG_STARTEND more explicitly. Summarizing the findings in the OpenBSD list: This solves a reproduceable issue with very recent Mesa where REG_NOTBOL combined with a match at the begin of the string causes our regex library to treat the word as not begin of word. Thanks to Martijn van Duren and Ingo Schwarze for taking the time to solve this in the least invasive way. PR: 209352, 209387 Taken from: openbsd-tech (Martijn van Duren) MFC after: 1 month Changes: head/usr.bin/sed/process.c A commit references this bug: Author: pfg Date: Mon Jun 27 20:54:03 UTC 2016 New revision: 302228 URL: https://svnweb.freebsd.org/changeset/base/302228 Log: sed(1): convert sed to use REG_STARTEND more explicitly. Summarizing the findings in the OpenBSD list: This solves a reproduceable issue with very recent Mesa where REG_NOTBOL combined with a match at the begin of the string causes our regex library to treat the word as not begin of word. Bump __FreeBSD_version: JIC we hit the issue in recent Mesa ports. PR: 209352, 209387 (exp-run) Taken from: openbsd-tech (Martijn van Duren) MFC after: 1 month Changes: _U stable/10/ stable/10/sys/sys/param.h stable/10/usr.bin/sed/process.c |