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

tools/bisect/README.md: added section about bisecting crashes / triage_version.py: skip some bogus commit hashes and version encountered in my bisect archive #6145

Merged
merged 2 commits into from
Mar 18, 2024
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
10 changes: 10 additions & 0 deletions tools/bisect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ To bisect these kinds of regressions you currently need to adjust the `bisect.sh
`1` - find the commit which started the hang<br/>
`2` - find the commit which resolved the hang<br/>

# Bisecting crashes

To bisect when a crash was introduced just do the same as you would for a regular error.

But if you want to find the commit which fixes a crash you need to add `-j2` to the options so the crash will generate an error instead of terminating the process and check for the expected string `crashed`.

```
./bisect.sh <hash-good> <hash-bad> "<cppcheck-options> -j2" "crashed"
```

### General notes

As we are currently using the process exitcode to pass the elapsed time to the script it will not work properly with vey long runtime (>= 255 seconds) as it will overflow.
Expand Down
14 changes: 14 additions & 0 deletions tools/triage_py/triage_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ def sort_commit_hashes(commits):
# this is the commit hash for the 2.9 release tag. it does not exist in the main branch so the version for it cannot be determined
if versions.count('aca3f6fef'):
versions.remove('aca3f6fef')
# 2.8 tags
if versions.count('61f846073'):
versions.remove('61f846073')
if versions.count('f998703a5'):
versions.remove('f998703a5')
# ???
if versions.count('d4505827b'):
versions.remove('d4505827b')
# 2.6 tag
if versions.count('d873b8e77'):
versions.remove('d873b8e77')
len_in = len(versions)
versions = sort_commit_hashes(versions)
if len(versions) != len_in:
Expand Down Expand Up @@ -124,6 +135,9 @@ def sort_commit_hashes(commits):
# sanitize version
version = version.replace('Cppcheck ', '').replace(' dev', '')

if version == 'CPPCHECK_MAJOR.CPPCHECK_DEVMINOR':
continue

cmd = [exe]
if do_compare and not args.no_quiet:
cmd.append('-q')
Expand Down
Loading