Repository navigation
0.2.0
cchecker 0.2.0 comes from running 0.1.0 over the Agentica VM in CI: it covers shapes that needed a cchecker: ignore there, and it makes the baseline safer to keep in CI.
CC_MAY_JUMPand[assume] may_jump: a call of a function that may jump out (longjmpon an error) is also a way out of its caller. A pointer that still owns there isCC-OWN-LEAK, and a lock still held isCC-PATH-LOCK-NOT-RELEASED.CC_OWNS_OUT: an out-parameter (int take(CC_OWNS_OUT char **out)) hands an owned pointer to the caller, andtake(&p)makespown it. A store into an array that owns (argv[i] = p) handspon to the array.--strict-baseline: a baseline entry whose finding is gone, in the tools and files the run covered, fails the run. Every run now names its stale entries.- Tool versions in the baseline: an update of every file records the versions of gcc, clang and clang-tidy. A run with another version number warns and lists the change in
version_changesof--json. A 0.1.0 baseline still reads.
Breaking: the macros of include/cchecker.h are now empty unless cchecker dumps the AST (CCHECKER_AST). A normal clang build no longer carries an annotate attribute on every mark. A project that read that attribute must define the macros itself. Copy the new header into your project.
Install and run (needs Agentica 0.26.1+, gcc 10+, clang and clang-tidy):
git clone --branch 0.2.0 https://github.com/agentica-lang/cchecker ~/cchecker
agentica ~/cchecker/cchecker.agc -p build # in your project, with build/compile_commands.jsonChangelog
Added
--strict-baseline: a stale baseline entry (its finding is gone) of the tools and files that the run covered exits- Every run now names its stale entries after the summary and in
staleof--json.
- Every run now names its stale entries after the summary and in
CC_MAY_JUMPand[assume] may_jump: a call of a function that may jump out (longjmpon an error) is also a way
out of its caller, where a pointer that still owns isCC-OWN-LEAKand a lock held isCC-PATH-LOCK-NOT-RELEASED.CC_OWNS_OUTon a parameter (char **out):*out = phandspout to the caller, andtake(&p)makespown
what the call left.argv[i] = pin an array that owns handspon to the array.- A baseline records the versions of the tools. An
--update-baselineof every file (no FILE, no--exclude) writes
those of the tools it ran (gcc,clang,clang-tidy) intotools, and a run with another version number warns on
standard error and lists the change inversion_changesof--json. The exit code does not change; a baseline of
0.1.0 still reads.
Changed
include/cchecker.h: the macros are empty unless cchecker dumps the AST (CCHECKER_AST), so a normal clang build no
longer carries anannotateattribute on every marked field and local. Breaking: a project that read the
annotateattribute defines the macros itself.