File size: 13,513 Bytes
de0c6ee | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | ---
pretty_name: DecBench C++ Qualification — Unofficial Cross-Platform Pilot
license: other
license_name: mixed-upstream-licenses
license_link: https://huggingface.co/datasets/sjkim1127/decbench-cpp-qualification#licensing
task_categories:
- other
tags:
- code
- cpp
- reverse-engineering
- decompilation
- cross-platform
- elf
- pe
- mach-o
- dwarf
- pdb
---
# DecBench C++ Qualification
An **unofficial cross-platform C++ corpus** for decompiler research, native debug-information inspection, and development of C++ evaluation methods.
The pilot contains **45 linked images from 10 unique projects**, organized into **15 project × platform configurations**, each built in three optimization modes. It includes GUI programs, a server, CLI tools, libraries, and userspace systems software.
**Current status: packaging verified; full qualification and scoring pending.** All 45 images are present, but the manifest deliberately reports `qualified=false` and `scoring_ready=false` for every image. This corpus has not been adopted as an official DecBench dataset, and this release does not report decompiler scores or rankings.
## Download the published pilot
The data currently lives on the **`codex/qualification-v2-pilot-20261012` staging branch**. The default branch provides this dataset card and retains the earlier qualification files.
For reproducible experiments, use this immutable **data snapshot**:
```text
07dd95dbe6214b8a78fc1e4a55961ab515986489
```
- [Browse the 45-image snapshot](https://huggingface.co/datasets/sjkim1127/decbench-cpp-qualification/tree/07dd95dbe6214b8a78fc1e4a55961ab515986489/qualification-v2)
- [Manifest and file hashes](https://huggingface.co/datasets/sjkim1127/decbench-cpp-qualification/blob/07dd95dbe6214b8a78fc1e4a55961ab515986489/qualification-v2/manifest.json)
- [Project revisions and target plan](https://huggingface.co/datasets/sjkim1127/decbench-cpp-qualification/blob/07dd95dbe6214b8a78fc1e4a55961ab515986489/qualification-v2/plan.json)
- [Build/import recipes and qualification contract](https://huggingface.co/datasets/sjkim1127/decbench-cpp-qualification/blob/07dd95dbe6214b8a78fc1e4a55961ab515986489/qualification-v2/README.md)
The snapshot's indexed payload is approximately **3.11 GB / 2.90 GiB**, including debug information, source evidence, metadata, and isolated analysis inputs.
## Platform coverage
| Platform | Architecture | Image / debug format | Project × platform configurations | Linked images |
|---|---|---|---:|---:|
| Linux | AArch64 / arm64 | ELF + DWARF | 6 | 18 |
| Windows | x86_64 | PE + native MSVC PDB / CodeView | 6 | 18 |
| macOS | arm64 | Mach-O + DWARF in dSYM | 3 | 9 |
| **Total** | | | **15** | **45** |
The pilot has a **40% Linux / 40% Windows / 20% macOS** configuration balance. Optimization variants are separate images, not separate projects.
### Projects and selected linked targets
| Platform | Project | Selected target | Program category |
|---|---|---|---|
| Linux | The Powder Toy | `powder` | GUI application |
| Linux | Snappy | `libsnappy.so.1.2.2` | Compression library |
| Linux | LevelDB | `libleveldb.so.1.23.0` | Storage library |
| Linux | SSDB | `ssdb-server` | Server |
| Linux | mergerfs | `mergerfs` | Userspace filesystem |
| Linux | OpenCC | `opencc` | CLI tool |
| Windows | Detours | `withdll.exe` | Userspace instrumentation tool |
| Windows | WinSparkle | `WinSparkle.dll` | Desktop update library |
| Windows | Ninja | `ninja.exe` | CLI build tool |
| Windows | Snappy | `snappy.dll` | Compression library |
| Windows | OpenCC | `opencc.exe` | CLI tool |
| Windows | Tracy | `tracy-profiler.exe` | GUI profiler |
| macOS | Ninja | `ninja` | CLI build tool |
| macOS | Snappy | `libsnappy.dylib` | Compression library |
| macOS | OpenCC | `opencc` | CLI tool |
Snappy and OpenCC provide shared project coverage across all three platforms; Ninja is shared by Windows and macOS. Exact upstream repository revisions are recorded in the plan and per-image metadata.
OS, architecture, compiler, and dependencies change together in this pilot. Results should be reported per project/platform/compiler/architecture; pooled scores cannot isolate an operating-system effect. The pilot has **no kernel or driver target**. C++ feature coverage is not yet certified; the plan leaves `feature_claims` empty until artifact evidence supports them.
## Optimization and toolchains
Each selected target has `O0`, `O2`, and `O2-noinline` variants.
| Family | O0 | O2 | O2-noinline |
|---|---|---|---|
| GCC / Apple Clang | `-O0` | `-O2` | `-O2 -fno-inline` |
| MSVC | `/Od /Ob0` | `/O2` | `/O2 /Ob0` |
These are compiler-specific profiles; equivalent mode labels do not imply identical compiler transformations. Effective commands and per-image evidence take precedence over a mode label. The Linux build lane uses GCC 13.3, the macOS lane uses Apple Clang 17, and Windows uses native MSVC. Windows runner images and available command provenance are recorded per image; compiler versions should not be assumed identical across all Windows artifacts.
Ninja and Tracy require explicit control of upstream LTO settings. The recipes preserve debug-bearing linked targets and verify project-compiland PDB evidence; the new Windows imports also check effective optimization flags and the absence of `/GL` in replayed C++ commands.
## Artifact layout and roles
```text
qualification-v2/
├── manifest.json / manifest.sha256
├── plan.json / toolchain-pins.json
├── inputs/{platform}/{architecture}/{mode}/{project}/
├── linux/arm64/{mode}/{project}/
├── windows/x86_64/{mode}/{project}/
├── macos/arm64/{mode}/{project}/
├── sources/{project}/
├── recipes/
└── audit/
```
The manifest is the authoritative inventory. Metadata may use `aarch64` for the architecture while directory names use `arm64`; follow each record's paths rather than constructing paths from labels.
- **`inputs/`** contains isolated, symbol-reduced decompiler inputs without adjacent PDB/dSYM files. ELF inputs have debug information and the static symbol table stripped; Mach-O inputs are stripped; PE inputs have their debug directory removed. This does not promise removal of every symbol or debug-related byte sequence.
- **Platform directories** contain original linked images, native debug information, function-identity evidence, status files, and available build logs/commands. Presence of a function record does not by itself certify per-function project ownership.
- **`sources/`** retains pinned tracked source archives and available preprocessing evidence. New Windows replay archives are stored alongside the corresponding Windows image. Provenance completeness varies by record.
- **`recipes/`** contains the build, import, validation, and sealing tools. [The tooling repository](https://github.com/sjkim1127/Decbench_SampleSet/tree/8f376e06f15e18a5f7663436f2e7ae587b0e3e68) provides the corresponding checkout layout.
- **`audit/`** records packaging checks, native build outcomes, and legacy inventory observations.
Use only `inputs/` for a stripped-input experiment. Keep source/debug artifacts on the evaluator side, separate from decompiler inputs. Preserving source and native debug evidence allows future scoring policies to distinguish source-level C++ types from ABI-level representations without rebuilding the entire corpus.
## Quick start
This is a file-based binary corpus, rather than a tabular Parquet dataset. Download files through the Hugging Face Hub.
### Download one input with `hf`
```bash
pip install -U huggingface_hub
hf download sjkim1127/decbench-cpp-qualification \
qualification-v2/manifest.json \
qualification-v2/inputs/windows/x86_64/O0/ninja/ninja.exe \
--repo-type dataset \
--revision 07dd95dbe6214b8a78fc1e4a55961ab515986489 \
--local-dir cpp-qualification
```
To download the full v2 namespace, use the same repository and revision with `--include 'qualification-v2/**'` in place of the explicit filenames.
### Select an input and check its hash in Python
```python
import hashlib
import json
from pathlib import Path
from huggingface_hub import hf_hub_download
repo = "sjkim1127/decbench-cpp-qualification"
revision = "07dd95dbe6214b8a78fc1e4a55961ab515986489"
def download(path):
return Path(hf_hub_download(
repo, "qualification-v2/" + path,
repo_type="dataset", revision=revision,
))
manifest = json.loads(download("manifest.json").read_text())
record = next(r for r in manifest["records"] if
r["platform"] == "windows" and r["project"] == "ninja"
and r["optimization"] == "O0")
binary = download(record["input"])
assert hashlib.sha256(binary.read_bytes()).hexdigest() == record["stripped_sha256"]
print(binary)
```
For evaluator-side files, follow the `binary` path and related status/evidence files. The tracked source archive at `sources/{project}/original.tar.gz` has the hash recorded in `original_source_sha256`. A file's presence or matching hash does not make it scoring-ready: inspect `qualified`, `scoring_ready`, and `remaining_gates` before selecting an evaluation population.
## What has been verified
At the immutable data snapshot above:
- **45/45 linked images**, all 15 planned configurations and all three modes are present; missing planned images: **0**.
- Code-preserving input preparation passed for all 45 images. Linux/Windows executable sections and macOS runtime sections were compared against their originals.
- Windows PE CodeView GUID/Age matches its PDB; macOS image/dSYM UUID pairs were checked. Native debug evidence and function ranges were retained.
- All 12 newly built Ninja/Snappy/OpenCC/Tracy Windows jobs passed their selected build, preprocessing, and PDB gates. Their imports verified effective C++ optimization profiles.
- **552 published files** were verified against local content, including **212 LFS SHA256 values**; the downloaded manifest matched the sealed local manifest byte-for-byte.
Ninja/Snappy/OpenCC evidence comes from [run 38326743980](https://github.com/sjkim1127/Decbench_SampleSet/actions/runs/38326743980). Its nine selected jobs succeeded; the run was then cancelled to stop superseded Tracy builds. Corrected Tracy evidence comes from [successful run 38326925658](https://github.com/sjkim1127/Decbench_SampleSet/actions/runs/38326925658). Existing Detours/WinSparkle evidence comes from run `38208011147`.
These checks establish packaging and native debug-pair consistency. They do not establish recovered-code runtime parity or full C++ evaluation correctness.
## Remaining qualification and evaluation work
The manifest currently reports **0 fully qualified images and 0 scoring-ready images**. Remaining work includes:
1. Complete per-TU compile/link provenance for inherited Linux artifacts, and preprocessing replay evidence for the inherited Detours/WinSparkle artifacts.
2. Full per-function source/range ownership proof. PDB ownership currently matches source files to compilands; template/header and dependency definitions still need individual ownership checks. Inherited DWARF CU ownership also has limits.
3. Exact resolved revisions, original archives, and license inventory for Tracy's fetched dependencies. Its external C++ preprocessing expansions are retained, but those alone do not complete dependency provenance.
4. PDB/dSYM identity and type evaluation integration, plus an agreed C++ type policy covering source-level and ABI-level representations.
5. Feature-coverage qualification and a defined function sampling/evaluation protocol.
The pinned DWARF evidence exporter reuses an existing DecBench reader. Its legacy variable summaries are not a complete C++ source-type model; packaging PDB or dSYM files does not add support to a type metric. Unsupported cases should be recorded explicitly when defining a scoring population.
## Relationship to the raw corpus and DecBench
- [**Raw corpus**](https://huggingface.co/datasets/sjkim1127/decbench-cpp-raw-corpus): the earlier, larger collection; this pilot curates selected targets and adds platform coverage and evidence. The raw corpus was preserved at `f1b7e849641baf1d35e293f400bc36aa7a1a4e2c` during packaging.
- **Qualification v2**: the versioned, reviewable pilot under `qualification-v2/` at the data snapshot above.
- [**DecBench**](https://github.com/Noelo-Lab/decbench): the related evaluation project. This dataset is an independent contribution candidate; no official integration or ranking is asserted.
The older `cpp-compiled/manifest.json` is not the v2 inventory. At legacy qualification revision `d211137b0471b6534ccebef08677dcd947e0a6a4`, it referenced 1,086 paths, of which 1,065 were absent, and included PDB/object files in its binaries array. Use the v2 manifest for pilot downloads and completeness checks.
## Licensing
This collection combines software from multiple upstream projects and dependencies. There is no single software license asserted for every bundled artifact. Tracked upstream license files are retained in the main-source archives; the fetched-dependency license/provenance inventory remains part of the qualification work described above.
## Maintainer and feedback
Maintained by [sjkim1127](https://huggingface.co/sjkim1127). Feedback on target diversity, debug completeness, source/ABI type contracts, and reproducible evaluation is welcome through this dataset's Community tab or the [corpus tooling repository](https://github.com/sjkim1127/Decbench_SampleSet).
|