Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion infra/cifuzz/sarif_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ def get_error_frame(crash_info):
return None
state = crash_info.crash_state.split('\n')[0]
logging.info('state: %s frames %s, %s', state, crash_info.frames,
[f.function_name for f in crash_info.frames[0]])
[f.function_name for f in crash_info.frames[0]]
if crash_info.frames else [])

for crash_frames in crash_info.frames:
for frame in crash_frames:
Expand Down
11 changes: 11 additions & 0 deletions infra/cifuzz/sarif_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ def _get_mock_crash_info():
return crash_info


class GetErrorFrameTest(unittest.TestCase):
"""Tests for get_error_frame."""

def test_empty_frames_does_not_raise(self):
"""Tests that get_error_frame doesn't raise IndexError when frames is empty."""
crash_info = mock.MagicMock()
crash_info.frames = []
crash_info.crash_state = 'some_func\nsome_func1'
self.assertIsNone(sarif_utils.get_error_frame(crash_info))


class GetErrorSourceInfoTest(unittest.TestCase):
"""Tests for get_error_source_info."""

Expand Down
1 change: 1 addition & 0 deletions projects/php/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ auto_ccs:
- "dmitrystogov@gmail.com"
- "tovilo.ilija@gmail.com"
- "github@derickrethans.nl"
- "jakub.php@gmail.com"
fuzzing_engines:
- "afl"
- "honggfuzz"
Expand Down
Loading