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/netbsd/report/1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/report/testdata/netbsd') diff --git a/pkg/report/testdata/netbsd/report/1 b/pkg/report/testdata/netbsd/report/1 index e341db2ff..bd7d51302 100644 --- a/pkg/report/testdata/netbsd/report/1 +++ b/pkg/report/testdata/netbsd/report/1 @@ -1,4 +1,4 @@ -TITLE: assert failed: pmap->pm_obj[i].uo_npages == 0 +TITLE: assert failed: pmap->pm_obj[i].uo_npages == NUM panic: kernel diagnostic assertion "pmap->pm_obj[i].uo_npages == 0" failed: file "/extra/netbsd-src/sys/arch/x86/x86/pmap.c", line 2368 cpu0: Begin traceback... -- cgit mrf-deployment