From 5eb471c41636ad06b65fd692ee01d978236f4441 Mon Sep 17 00:00:00 2001 From: Luigi Semenzato Date: Mon, 29 Apr 2013 12:38:36 -0700 Subject: [PATCH] Hash only warning "file:line" in warning collector. Before this change, the signature of a warning is computed from a string such as this one: /mnt/host/source/src/third_party/kernel/files/drivers/gpu/drm/i915/intel_dp.c:351 intel_dp_check_edp+0x6b/0xb9() This change removes all text after the first space, i.e. the function name and IP offset. The latter varies across architectures and can vary across builds, giving different signatures for the same warning. BUG=chromium:227080 TEST=manual Change-Id: Ied65dbd8edd734bd152a9dd35aaa48f1e8f1b9e8 Reviewed-on: https://gerrit.chromium.org/gerrit/49505 Commit-Queue: Luigi Semenzato Reviewed-by: Luigi Semenzato Tested-by: Luigi Semenzato --- crash_reporter/warn_collector.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crash_reporter/warn_collector.l b/crash_reporter/warn_collector.l index d0977dcf6..7b6575bf9 100644 --- a/crash_reporter/warn_collector.l +++ b/crash_reporter/warn_collector.l @@ -48,7 +48,7 @@ END_TRACE {PREFIX}" ---[ end trace".* ^{CUT_HERE}\n{WARNING} BEGIN(PRE_WARN); .|\n /* ignore all other input in state 0 */ -.*\n if (WarnStart()) { +[^ ]+\n if (WarnStart()) { /* yytext is file:line */ BEGIN(WARN); ECHO; } else { BEGIN(0);