From 2489ab887a86e8b1b253aef742e365a606db3a4f Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 3 Aug 2021 18:03:25 +0000 Subject: pkg/report: do more agressive NUM-replacement Replace not just long sequences of digits in report titles, but every sequence of '0'-'9' that is not surrounded by word characters. As such matches will overlap and Go does not (currently?) support regexp lookarounds, do the replacement multiple times until there is nothing more to do. This should not slow down syzkaller, since this code is only invoked during crash processing. Restrict LINE replacement only to fragments that have a preceeding file name. This prevents replacements like [1:2] -> [NUM:LINE]. --- pkg/report/testdata/all/report/2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/report/testdata/all') diff --git a/pkg/report/testdata/all/report/2 b/pkg/report/testdata/all/report/2 index c8aecab31..d583c5398 100644 --- a/pkg/report/testdata/all/report/2 +++ b/pkg/report/testdata/all/report/2 @@ -1,4 +1,4 @@ -TITLE: panic: executor 2: failed: event already set (errno 0) +TITLE: panic: executor NUM: failed: event already set (errno NUM) panic: executor 2: failed: event already set (errno 0) child failed (errno 2) -- cgit mrf-deployment