Log date · Tue
How do you check an obfuscation pass after LLVM 23?
Check plugin support, IR, behavior and release artifacts; a successful build alone does not prove a pass still works.
Start with the result
Before upgrading LLVM, establish plugin support and verify both the transform and program behavior. With Apple Clang 21, our sample produced three IR branch instructions at O0 and none at O2, while both executables printed 1 6. Branch counts can change with optimization and cannot establish protection on their own.
| Question | Result |
|---|---|
| Runtime | Both builds print 1 6 |
| IR branches | 3 at O0, 0 at O2 |
| Does this prove LLVM 23 plugin compatibility? | No |
This uses the installed Apple Clang 21, not LLVM 23.1.0 or a test of any obfuscation plugin. The sample illustrates why IR comparisons must control compilation conditions.
What changed in LLVM 23
The LLVM project published llvmorg-23.1.0 on 2026-08-25 at 19:21 UTC. [1] Its notes split the Br opcode into UncondBr and CondBr and deprecate BranchInst. CondBr operand order also changed, which can subtly break code accessing successors with getOperand or setOperand. [2]
For an out-of-tree pass that changes control flow, compilation is only the first gate. Exercise conditional and unconditional branches, check each edge destination and test runtime behavior. Constant::isZeroValue was removed; the notes recommend isNullValue, but floating-point negative zero differs, so add a targeted migration test. bugpoint was also removed in favor of llvm-reduce and the provided pipeline reduction script. [2]
Other platform changes belong in release review too: AArch64 Windows return-address signing defaults to the B-key, BOLT supports AArch64 binaries using PAC and BTI, and LLDB on Darwin trusts scripts in code-signed dSYM bundles by default. [2] Treat symbol files as sensitive build artifacts.
An upgrade needs a stable set of inputs and expected outputs. Cover boundary values, error paths and every branch category handled by the plugin: a happy-path test can miss a change in successor order. Reduce a failure to a minimal reproducible input before sharing a sample without business secrets with the plugin maintainer. Keep the compiler diagnostics and the exact pipeline alongside it so the failure can be reproduced.
Reproduce the optimization comparison
Our C sample adds one to inputs above 3 and subtracts one otherwise; main tests 2 and 5. We emitted IR and an executable for each optimization level, ran both with the same inputs and counted textual IR instructions beginning with br. Clang documents its compilation stages and optimization options. [3]
clang -O0 -S -emit-llvm sample.c -o sample-O0.ll
clang -O2 -S -emit-llvm sample.c -o sample-O2.ll
grep -c '^[[:space:]]*br ' sample-O0.ll
grep -c '^[[:space:]]*br ' sample-O2.llO0 output: 1 6
O0 IR branch instructions: 3
O2 output: 1 6
O2 IR branch instructions: 0These counts cover the generated textual module, not the total basic blocks or the branches in final machine code. An optimizer can change representation while preserving output. For a real plugin, compare IR immediately before and after the pass in the same pipeline, inspect target functions, edges and expected transformations, and avoid treating a count as a security score.
Before comparing artifacts, confirm both builds use the same source, target and configuration. LTO, inlining and other optimizations can change structure. Record each difference and its cause rather than assuming that a larger binary is automatically better protected. Loading logs and before-and-after snapshots help distinguish a pass that never ran from a later optimization that changed its output. A passing functional test alone cannot establish that the expected transformation was applied.
Upgrade decisions and your own app
The following are recommendations, not compatibility results from our experiment. Retain the old toolchain and a reproducible release build until the new combination passes acceptance.
| Case | Next step |
|---|---|
| Plugin support not declared | Keep the release branch pinned and evaluate in isolation. |
| Plugin builds | Check that the pass loads, runs and transforms intended functions. |
| Metrics change sharply | Compare optimization flags and pipelines, then inspect IR and behavior. |
| Release candidate passes | Run regression tests and re-sign and notarize where required. |
For your application, record compiler and plugin versions, target architecture, optimization flags and pass order. Save IR before and after the pass for critical functions and test each branch with known inputs. Test functions outside the intended scope too. When comparing function counts, basic blocks and size, first match build settings; differences are leads for investigation.
When downloading a release package, verify its matching GPG signature or GitHub CLI attestation as described on the release page. [1] Store dSYM, PDB and similar symbols in a controlled crash-analysis system. After full functional and platform regression, retain version records and a rollback path.
Before release, also verify performance, crash symbolication and signing on target devices. Associate acceptance results with the build identifier and preserve the previous toolchain and dependencies so the team can reproduce and roll back a problem. Review changes in the actual release configuration, including architecture and link-time settings, rather than relying only on a development build.
Your checklist
- Confirm plugin support for the target LLVM version.
- Record compiler, plugin, architecture and optimization settings.
- Inspect IR and branch behavior before and after the pass.
- Verify downloads and keep symbols private.
- Run full regression and retain a rollback path.
Primary sources
- GitHub: llvm/llvm-project release LLVM 23.1.0 · Source date 2026-08-25 · Checked 2026-10-12
- LLVM: LLVM 23.1.0 Release Notes · Source date 2026-08-25 · Checked 2026-10-12
- Clang command guide · Checked 2026-11-11