agl/nullok — explained in plain English
Analysis updated 2026-07-17 · repo last pushed 2016-07-01
Compare compiled assembly with and without the nonnull pointer assumption.
Study how C11's nonnull rule changes compiler optimizations.
Rebuild a set of open-source packages under two header configurations to see the difference.
| agl/nullok | ac000/libctemplate | jssroberto/antigravity-2-fedora-installer | |
|---|---|---|---|
| Stars | 11 | 11 | 11 |
| Language | Shell | Shell | Shell |
| Last pushed | 2016-07-01 | 2022-01-19 | — |
| Maintenance | Dormant | Dormant | — |
| Setup difficulty | hard | moderate | easy |
| Complexity | 4/5 | 2/5 | 2/5 |
| Audience | researcher | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Requires manually preparing two modified versions of C standard library headers before running the scripts.
This repository contains tools for exploring how C compilers behave when they're told whether function inputs can be null pointers or not. It's built around a specific rule in the C11 standard that says functions in the standard library assume all pointers you pass to them are valid (not null). The author created these scripts to test what actually happens to compiled code when you remove that assumption. The way it works is fairly straightforward: the scripts compile several open-source software packages twice, once with the standard "pointers can't be null" assumption in place, and once with that assumption removed. Then it captures the disassembly (the low-level machine instructions generated by the compiler) for both versions and writes them to files so you can compare them side by side. The difference between these two versions shows what optimizations or code changes the compiler was making based on that null-pointer assumption. To run this yourself, you need to manually set up two modified versions of your C standard library header files: one that keeps the original "nonnull" annotations (the standard assumption) and one that strips them out. The scripts then use these to recompile various packages. The whole process takes a while since it's rebuilding multiple software projects, but it's mostly automated, you just run one main script and let it work through the list. This is useful for compiler developers, performance enthusiasts, or anyone curious about how the C standard's assumptions translate into real performance implications. The blog post linked in the README goes into more depth about why this matters: the compiler can make different optimization choices depending on whether it knows a pointer can never be null. By seeing the actual assembly output, you can understand exactly what those optimizations are and whether they're worth the trade-offs.
Scripts that recompile C programs with and without the "pointers can't be null" compiler assumption, so you can compare the resulting machine code side by side.
Mainly Shell. The stack also includes Shell, C.
Dormant — no commits in 2+ years (last push 2016-07-01).
No license information was found in the explanation.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
double-check against the repo, no cap.