Skip to content

Commit

Permalink
tools/bisect/README.md: added section about bisecting crashes / triag…
Browse files Browse the repository at this point in the history
…e_version.py: skip some bogus commit hashes and version encountered in my bisect archive (#6145)
  • Loading branch information
firewave authored Mar 18, 2024
1 parent 7fd0cae commit 7fef83a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
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

0 comments on commit 7fef83a

Please sign in to comment.