In bsdgrep(1), fix escape map building in the regex parser. It was previously using memory not explicitly initialized, and the MBS escape map was being built based on a version of the pattern with escapes already parsed out.
PR: 175314
Differential D10098
bsdgrep(1): Fix escape map building for multibyte strings emaste on Mar 22 2017, 5:52 PM. Authored by Tags None Referenced Files
Details In bsdgrep(1), fix escape map building in the regex parser. It was previously using memory not explicitly initialized, and the MBS escape map was being built based on a version of the pattern with escapes already parsed out. PR: 175314 Run test cases stated by jbeich@ in the PR, ensure no further failures in kyua tests
Diff Detail
Event TimelineComment Actions
Comment Actions
Comment Actions
Comment Actions It's worth noting that I don't have much faith at the moment that (_escmap/fg->wescmap/fg->escmap in !TRE_WCHAR case) construction is correct, either. I'm fairly certain it should be taking into account escape sequences, but I will check that out and address it in a separate patch. Comment Actions Apologies, I meant to update this sooner -- I'm kind of torn here. This may no longer be necessary if we can run D10282 through or go a step further and just rip out the TRE bits instead of the intermediate D10282. I feel fairly confident that our regex(3) implementation can much more reasonably fulfill this duty, and just as quickly. Comment Actions
I'd rather we commit the work that's already been done here, even if we eventually remove this altogether. |