Skip to content

Commit e60b36e

Browse files
authored
Fix Chromium check failure file/line parsing. (#4947)
Builds on #4946 which introduces the test. Fixes the regex and tests that the filename is correctly extracted now. Fixes: https://crbug.com/443678564
1 parent c49f40c commit e60b36e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/clusterfuzz/_internal/tests/core/crash_analysis/stack_parsing/stack_analyzer_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,7 +2505,7 @@ def test_check_file_line(self):
25052505
expected_type = 'CHECK failure'
25062506
expected_address = ''
25072507
expected_state = (
2508-
'atk_child in 143\n'
2508+
'atk_child in ax_tree_formatter_auralinux.cc\n'
25092509
'base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork\n'
25102510
)
25112511
expected_stacktrace = data
@@ -2878,7 +2878,7 @@ def test_check_eq_multiline2(self):
28782878
expected_type = 'CHECK failure'
28792879
expected_address = ''
28802880
expected_state = (
2881-
'std::string_view(content::indexed_db::EncodeSortableIDBKey(key)) == input in 40\n'
2881+
'std::string_view(content::indexed_db::EncodeSortableIDBKey(key)) == input in ind\n'
28822882
'InvokeCallback\n'
28832883
'~Cleanup\n'
28842884
)

src/clusterfuzz/stacktraces/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
CFI_NODEBUG_ERROR_MARKER_REGEX = re.compile(
8888
r'CFI: Most likely a control flow integrity violation;.*')
8989
CHROME_CHECK_FAILURE_REGEX = re.compile(
90-
r'\s*\[[^\]]*[:]([^\](]*).*\].*(?:Check failed:|DCHECK failed:|NOTREACHED hit.)\s*(.*)' # pylint: disable=line-too-long
90+
r'\s*\[[^\]]*[:]([^\](]*\([0-9]+\)|[^\]:]*[:][0-9]+).*\].*(?:Check failed:|DCHECK failed:|NOTREACHED hit.)\s*(.*)' # pylint: disable=line-too-long
9191
)
9292
CHROME_STACK_FRAME_REGEX = re.compile(
9393
r'[ ]*(#(?P<frame_id>[0-9]+)[ ]' # frame id (2)

0 commit comments

Comments
 (0)