abicheck
abicheck combines binary, debug, header, build, and (optionally) source evidence to detect the widest practical set of mechanical C/C++ ABI/API compatibility breaks — while reporting exactly which finding classes weren't checkable with the evidence you gave it, rather than silently passing. It compares two versions of a shared library — along with their public headers — and reports whether existing binaries will continue to work or break at runtime.
It catches removed or renamed symbols, changed function signatures, struct layout drift, vtable reordering, enum value reassignment, and many more — 361 ABI/API change types in total — that cause crashes, silent data corruption, or linker failures after a library upgrade.
Platforms: Linux (ELF), Windows (PE/COFF), macOS (Mach-O). Binary and header AST analysis on all platforms; debug-info cross-check uses DWARF (Linux, macOS) and PDB (Windows). MinGW-built DLLs are validated end-to-end in CI; native MSVC+PDB verdicts are experimental (the CI lane is non-blocking until proven stable) — see Platform Support.
Full documentation: abicheck.github.io/abicheck
Key features
- Reads multiple sources of information. abicheck doesn't rely on a single view of a library. It overlays up to five independent, additive sources — the compiled binary, its debug symbols, its public headers, its build-system data, and (optionally) its sources — and lets the strongest evidence win. Each source finds breaks the weaker ones are blind to, and removes false positives the weaker ones would raise. See How it works below.
- Detects most of what causes ABI/API breaks. 361 change types across functions, variables, structs/classes, enums, unions, typedefs, templates, and platform/linker metadata — removed or renamed symbols, changed signatures and parameter lists, struct/class layout drift, field-offset shifts, vtable reordering, enum value reassignment, qualifier/
noexcept/access changes, calling-convention and packing changes, symbol-version and SONAME drift, dependency leaks, and more. Each is classified asBREAKING,API_BREAK,COMPATIBLE_WITH_RISK, orCOMPATIBLE. See the Change Kind Reference. - Cross-platform. Linux (ELF), Windows (PE/COFF), and macOS (Mach-O) binaries, with debug-info cross-checks from DWARF, PDB, BTF, and CTF. See Platform Support for what's validated in CI per platform (native MSVC+PDB verdicts are experimental).
- Built for CI. Deterministic exit codes, SARIF/JSON/Markdown/HTML/JUnit output, snapshot-based baselines, policy profiles and suppressions, and a first-class GitHub Action.
- Public-surface scoping. Filters findings to the library's public ABI surface so internal-only changes don't fail your build — fewer false positives than symbol-only tools.
- More than one library at a time. Compare co-versioned multi-library releases as a single bundle (
compareon directory/package inputs), check whether a specific application still works (compare --used-by), or validate a binary's full dependency stack across sysroots (deps compare). - Drop-in for existing tools. A
compatmode mirrorsabi-compliance-checkerflags, and migration guides cover ABICC and libabigail. - Agent- and script-friendly. Structured JSON, a Python API, and an MCP server for AI-driven workflows. Pure Python (3.10+), no heavyweight native toolchain required for binary-only mode.
How it works — multiple sources of information
abicheck treats compatibility analysis as a question of evidence: the more independent sources you give it about a library, the more it can prove — and the fewer false positives it raises. There are five layers, ordered from the least input to the most. Each one adds facts the previous cannot see; none is complete on its own.
| Layer | Source you provide | Read by | What it newly reveals |
|---|---|---|---|
| L0 | Just the binary — a stripped .so / .dll / .dylib |
ELF/PE/COFF/Mach-O parsers (pyelftools, pefile, macholib) |
Exported symbols, SONAME/install-name, symbol versions, visibility, binding, DT_NEEDED/LC_LOAD_DYLIB dependencies |
| L1 | + Debug symbols — a -g build or sidecar debug file |
DWARF, PDB, BTF, CTF | Type layout: struct/class sizes, field offsets, enum values, vtable slots, calling convention, packing/alignment |
| L2 | + Public headers — -H include/ |
castxml AST | Source-level API: signatures, overloads, access (public/private), final/explicit/noexcept, templates, default args, public/internal scoping |
| L3 | + Build system data & options — -p build/ |
compile DB / CMake / Ninja / Bazel / Make | The flags the library was actually built with: -std, _GLIBCXX_USE_CXX11_ABI, -fvisibility, -fabi-version, toolchain/sysroot, export maps |
| L4 | + Sources — a build/source pack | per-TU source ABI replay | Facts that never reach the binary: macro/constexpr values, default-argument values, inline/template bodies, uninstantiated templates |
The layers are independent and additive, not a fallback chain — abicheck overlays every source you give it and computes one worst-wins verdict, under the authority rule: artifact-backed evidence (L0/L1/L2) is authoritative for the shipped-ABI verdict, while build/source evidence (L3/L4) explains, localizes, scopes, or adds confidence to a finding (and can raise its own source-/API-level findings) but never silently deletes an artifact-proven break.
A sixth code you may see in the docs:
L5is the source reachability graph abicheck derives from L3/L4 evidence — you provide five sources (L0–L4); L5 is computed, never an input. It appears in thescandocumentation.
With less input, abicheck degrades gracefully down the staircase rather than failing — a stripped binary with no headers collapses toward symbol-only checking — and abicheck dump --dry-run reports exactly which layers it found. The best input you can give it is old library + new library + matching public headers + debug info + build data. See Evidence & Detectability for what each source can and cannot see, and Architecture for how the layers are reconciled.
Installation
pip install abicheck
# or
conda install -c conda-forge abicheck
abicheck also needs castxml and a C++ compiler for header AST analysis (the conda-forge package pulls these in automatically). Without them, abicheck still works in binary-only mode. See Getting Started for per-platform setup and cross-compilation.
Naming note: the PyPI/conda-forge package (
abicheck) is distinct from the older SourceForgeabicheckthat is still packaged by some Linux distributions, and from similarly named ABI tools such asabi-compliance-checkerwrappers or Fedora'slibabigail-tools. Runabicheck --versionto confirm — it should printabicheck X.Y.Z (abicheck/abicheck). If there is a conflict, invoke viapython -m abicheck.
Quick start
Compare two library versions:
abicheck compare libfoo.so.1 libfoo.so.2 \
--header old=include/v1/foo.h --header new=include/v2/foo.h
Save a baseline snapshot at release time, then compare every new build against it:
abicheck dump libfoo.so -H include/foo.h --version 1.0 -o baseline.json
abicheck compare baseline.json ./build/libfoo.so --header new=include/foo.h
Supported output formats: markdown (default), json, sarif, html, and junit.
abicheck compare old.so new.so -H foo.h --format sarif -o report.sarif
See Getting Started for the full tutorial and CLI Usage for the complete command reference.
Which command do I need?
abicheck's whole CLI is exactly 5 root commands: dump, compare, scan, deps, compat.
| I want to… | Use |
|---|---|
| Check whether a library upgrade breaks existing consumers | abicheck compare |
| Compare a multi-library release (a co-versioned bundle, e.g. oneDAL) as a single bundle | abicheck compare |
| Check whether my application breaks with a new library version | abicheck compare --used-by APP |
| Check whether a plugin still satisfies its host's required entrypoints | abicheck compare --required-symbol SYM |
| Run a deterministic source-intelligence scan (classify → audit → optional compare) | abicheck scan ARTIFACT |
| Validate a binary's full dependency stack across two sysroots | abicheck deps compare |
Drop-in replacement for abi-compliance-checker |
abicheck compat |
| Save a reusable ABI snapshot | abicheck dump |
Exit codes
Use these to gate CI pipelines.
| Exit code | Verdict | Meaning |
|---|---|---|
0 |
NO_CHANGE / COMPATIBLE / COMPATIBLE_WITH_RISK |
Safe — no binary ABI break |
2 |
API_BREAK |
Source-level break (recompile needed, binary may still work) |
4 |
BREAKING |
Binary ABI break (old binaries will crash or misbehave) |
8 |
REMOVED_LIBRARY |
Library removed in new version (multi-library compare with --fail-on-removed-library) |
Any active severity setting (a --severity-* flag or a severity value in .abicheck.yml) switches compare to a severity-based scheme where 1 means an error-level finding in the addition/quality categories (0 still passes, 4 is still worst). scan, deps compare, and compat add per-command codes (e.g. scan also has a 5 for --budget overflow). The canonical matrix is the exit code reference; how snapshots, policies, suppressions, and severity combine into the exit code is covered in CI Gating.
GitHub Action
- uses: abicheck/abicheck@v0.3.0
with:
old-library: abi-baseline.json
new-library: build/libfoo.so
new-header: include/foo.h
format: sarif
upload-sarif: true
The action installs Python, castxml, and abicheck automatically. Outputs: verdict, exit-code, report-path. See the GitHub Action docs for matrix builds, cross-compilation, and gating flags (fail-on-breaking, fail-on-api-break).
The default compare path only needs normal checkout access. Extra repository permissions are needed only for optional GitHub integrations: pull-requests: write for PR comments and security-events: write for SARIF upload.
Policies and suppressions
Policies classify detected changes (BREAKING, COMPATIBLE, …); suppressions silence known or intentional changes so they don't fail CI.
abicheck compare old.so new.so -H foo.h \
--policy sdk_vendor \
--suppress suppressions.yaml
Built-in profiles: strict_abi (default), sdk_vendor, plugin_abi. Custom YAML policies are supported, and the ABICC compat CLI accepts -symbols-list/-types-list whitelist flags.
Full references:
- Policy Profiles
- Suppressions (YAML schema, expiry, justification)
- Migrating from ABICC
Python API
from pathlib import Path
from abicheck.service import run_compare
result, old_snapshot, new_snapshot = run_compare(
old_input=Path("libfoo.so.1"),
new_input=Path("libfoo.so.2"),
old_headers=[Path("include/v1/foo.h")],
new_headers=[Path("include/v2/foo.h")],
)
print(result.verdict) # e.g. Verdict.BREAKING
print(len(result.changes)) # number of detected changes
See the Python API guide for snapshots, custom policies, and rendering, plus the MCP server integration for AI-agent workflows.
Examples
The examples/ directory contains 186 real-world ABI/API scenarios (181 single-library cases plus 5 multi-library bundle cases) with ground-truth verdicts. Most are single-library v1/v2 examples with a consumer app; the G20 audit/cross-source cases (143–151) are single-build snapshots demonstrating intra-version cross-checks; the L3/L4/L5 build/source-only cases (152–161) ship hand-built evidence-model fixture pairs demonstrating failures no artifact layer can see; case 164 ships a guard-annotated fixture pair demonstrating a build-context-cleared header false positive (ADR-039); bundle/release-level cases use release-style layouts. The full catalog is the development regression corpus; a smaller historical cross-tool subset is kept in the reference docs for release-to-release comparison with libabigail and ABICC.
The authoritative completeness gate is the full example matrix: compiler lanes, runtime smoke, bundle validation, and dedicated proof owners are aggregated into exactly one row per ground-truth case. A green single-library lane or a libv1.so/libv2.so pair scan is not full-catalog proof. See the full example validation runbook for runner selection, the reproducible workflow, artifact semantics, and agent rules.
Validation snapshot
The main validation target is the full 186-case catalog. To scan it for the current checkout:
python scripts/benchmark_comparison.py --suite all
The command writes benchmark_reports/benchmark_report.json with the selected suite, abicheck version, git commit, tool versions, the ground_truth.json SHA-256, and per-tool accuracy. Cases that require bundle/release harnesses or unavailable compiler features are marked as unscored instead of being folded into single-library verdict accuracy.
For apples-to-apples comparison with libabigail and ABICC, release workflows also run the historical pinned cross-tool subset (case01-case73 + case26b) and attach that report to GitHub Releases:
python scripts/benchmark_comparison.py --suite pinned74
Detection by evidence source
The five sources of information each find breaks the weaker sources are blind to. The table below is derived from the examples/ground_truth.json minimum-evidence labels of all 169 catalog cases. The --evidence-tiers mode empirically scans the runnable catalog at L0-L3; L4 source-pack measurement is tracked as a separate extension:
python scripts/benchmark_comparison.py --evidence-tiers
| Source you provide | Cumulative cases reaching the correct verdict |
|---|---|
Just the binary (L0) |
52 / 169 (31%) |
+ Debug symbols (L1) |
119 / 169 (70%) |
+ Public headers (L2) |
150 / 169 (89%) |
+ Build data (L3) |
160 / 169 (95%) |
+ Sources (L4) |
166 / 169 (98%) |
+ Source graph (L5) |
169 / 169 (100%) |
More evidence also removes false positives (e.g. header scoping correctly dismisses internal-struct changes). This staircase is a discoverability floor — the minimum source that unlocks the correct verdict per case — not a blind accuracy score; for the stricter number that also penalizes false positives across the whole catalog, see the full-catalog benchmark (L3-L5 scores 90.0% there, with 7 known false positives). See Evidence & Detectability for what each source reveals and Benchmarking by evidence tier for the methodology.
Per-case matrix, methodology, full-catalog notes, and the pinned cross-tool comparison table: Tool Comparison & Benchmarks.
Documentation
- Start here: Getting Started
- User guide: CLI Usage · Application compatibility · Output formats · GitHub Action
- Concepts: Verdicts · Architecture · ABI/API Handling & Recommendations · Limitations
- Reference: Change Kinds · Exit Codes · Platforms · Tool Comparison
- Troubleshooting: Troubleshooting guide
Citation and machine-readable metadata
- GitHub renders CITATION.cff through Cite this repository.
- CodeMeta and Zenodo deposit metadata expose software identity, licensing, authorship, and dependency metadata.
- The published versioned JSON Schemas
describe the machine-readable output contracts. Each schema's canonical
$idis a resolvable HTTPS URL.
Contributing
See CONTRIBUTING.md for setup, testing, code style, and PR workflow. Project status and roadmap: development/goals.md.
License
Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE.
Copyright 2026 Nikolay Petrov
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abicheck-0.5.0.tar.gz.
File metadata
- Download URL: abicheck-0.5.0.tar.gz
- Upload date:
- Size: 3.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f02a40d41ee2dc38fff33de1955bda50199354142e03806ecb9308bb59678a2b
|
|
| MD5 |
6e6f7fd278a0380ac494e1df244548a9
|
|
| BLAKE2b-256 |
dfe0a2b077561bb72aafd95103ca9ef9e73d77d3b06de0f253cb82caad13de34
|
Provenance
The following attestation bundles were made for abicheck-0.5.0.tar.gz:
Publisher:
publish.yml on abicheck/abicheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abicheck-0.5.0.tar.gz -
Subject digest:
f02a40d41ee2dc38fff33de1955bda50199354142e03806ecb9308bb59678a2b - Sigstore transparency entry: 2187492567
- Sigstore integration time:
-
Permalink:
abicheck/abicheck@30bf11ce41117e5641f6d783e76289fa44dcf6a5 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/abicheck
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@30bf11ce41117e5641f6d783e76289fa44dcf6a5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file abicheck-0.5.0-py3-none-any.whl.
File metadata
- Download URL: abicheck-0.5.0-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4427224d58014d1a33319bc4d62ebc86121971801ba133c8670e765f36f878a6
|
|
| MD5 |
43731a7a804f3359d11480b7dc9aa71d
|
|
| BLAKE2b-256 |
0448290ea351b3affae139e2013b9975109fc2ba6d8ff7e6621fcf18a999dd60
|
Provenance
The following attestation bundles were made for abicheck-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on abicheck/abicheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abicheck-0.5.0-py3-none-any.whl -
Subject digest:
4427224d58014d1a33319bc4d62ebc86121971801ba133c8670e765f36f878a6 - Sigstore transparency entry: 2187492597
- Sigstore integration time:
-
Permalink:
abicheck/abicheck@30bf11ce41117e5641f6d783e76289fa44dcf6a5 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/abicheck
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@30bf11ce41117e5641f6d783e76289fa44dcf6a5 -
Trigger Event:
release
-
Statement type: