From 16f6616acaa4fcf44edbc3b56ca10fc06b07cf25 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 24 Oct 2014 13:27:29 -0700 Subject: grep: fix grep -P crash Reported by Shlomi Fish in: http://bugs.gnu.org/18806 Commit 9fa500407137f49f6edc3c6b4ee6c7096f0190c5 (2014-09-16) is a hack that I put in to speed up 'grep -P'. Unfortunately, not only is it violation of modularity, it's also a bug magnet, as we have found out with Bug#18738 and Bug#18806. Remove the optimization instead of applying more bandaids. Perhaps we can think of a better way of doing the optimization, or perhaps we can just live with a slower grep -P (as -P is inherently slower anyway...). * src/grep.c, src/grep.h (validated_boundary): Remove. All uses removed. * src/pcresearch.c (Pexecute): Do not worry about validated_boundary. --- src/grep.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/grep.h') diff --git a/src/grep.h b/src/grep.h index 86259fbe..02052b48 100644 --- a/src/grep.h +++ b/src/grep.h @@ -47,8 +47,4 @@ enum textbin /* Input file type. */ extern enum textbin input_textbin; -/* Validation boundary. Earlier bytes have already been validated by - the PCRE matcher, which cares about this sort of thing. */ -extern char const *validated_boundary; - #endif -- cgit v1.2.1