You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
gcovr crashes with an uncaught exception when parsing a gcov file containing this line:
-: 0:Source is newer than graph
To Reproduce
Steps to reproduce the behavior:
Update the timestamp of a file after the gcda file for it was created.
Run gcovr
Alternatively you could alter a .gcov file to contain that line.
Expected behavior
gcovr should of course not crash in this scenario, because that makes it difficult to know what went wrong. I'm fine with gcovr exiting with printing an error in this scenario, but that's up to you to decide. This issue did expose an issue in my build environment that I resolved now to avoid those lines happening, so there's no rush to fix this. But for the general community I think it would be better to have this fixed.
Screenshots
N/A
Desktop (please complete the following information):
OS: ubuntu 22.04
GCC version: 11.2.0
GCOVR version: 5.1
Project directory layout:
Roots: ./
Object directories: build/**
Additional context
Stacktrace:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gcovr/workers.py", line 77, in worker
work(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov.py", line 317, in process_datafile
done = run_gcov_and_process_files(
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov.py", line 490, in run_gcov_and_process_files
process_gcov_data(fname, covdata, abs_filename, options)
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov.py", line 100, in process_gcov_data
metadata = parse_metadata(lines)
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov_parser.py", line 226, in parse_metadata
parsed_line = _parse_line(line)
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov_parser.py", line 724, in _parse_line
key, value = source_code.split(":", 1)
The text was updated successfully, but these errors were encountered:
Describe the bug
gcovr crashes with an uncaught exception when parsing a gcov file containing this line:
-: 0:Source is newer than graph
To Reproduce
Steps to reproduce the behavior:
Alternatively you could alter a .gcov file to contain that line.
Expected behavior
gcovr should of course not crash in this scenario, because that makes it difficult to know what went wrong. I'm fine with gcovr exiting with printing an error in this scenario, but that's up to you to decide. This issue did expose an issue in my build environment that I resolved now to avoid those lines happening, so there's no rush to fix this. But for the general community I think it would be better to have this fixed.
Screenshots
N/A
Desktop (please complete the following information):
Additional context
Stacktrace:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gcovr/workers.py", line 77, in worker
work(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov.py", line 317, in process_datafile
done = run_gcov_and_process_files(
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov.py", line 490, in run_gcov_and_process_files
process_gcov_data(fname, covdata, abs_filename, options)
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov.py", line 100, in process_gcov_data
metadata = parse_metadata(lines)
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov_parser.py", line 226, in parse_metadata
parsed_line = _parse_line(line)
File "/usr/local/lib/python3.10/dist-packages/gcovr/gcov_parser.py", line 724, in _parse_line
key, value = source_code.split(":", 1)
The text was updated successfully, but these errors were encountered: