Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcov detection fails on Windows if version is found at end of line #1189

Open
mitchgrout opened this issue Jul 15, 2024 · 0 comments
Open

gcov detection fails on Windows if version is found at end of line #1189

mitchgrout opened this issue Jul 15, 2024 · 0 comments

Comments

@mitchgrout
Copy link

gcov::parse_version currently splits words using either whitepace or newlines, but does not account for carriage returns. This can lead to failures to detect valid gcov binaries on Windows. Example using the w64devkit bundled version of gcov:

$ gcov --version | head -n1
gcov (GCC) 14.1.0

$ gcov --version | head -n1 | xxd -c20
00000000: 6763 6f76 2028 4743 4329 2031 342e 312e 300d 0a    gcov (GCC) 14.1.0..

The gathered versions are ["gcov", "(GCC)", "14.1.0<CR>"], all of which fail Version::parse

This could be fixed by adding '\r' into this list, or by using char.is_whitespace or char.is_ascii_whitespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant