Finding ODR Violations with ORC
summary
C++ One Definition Rule bugs can silently corrupt behavior across builds; ORC wraps the linker, scans DWARF debug info and flags mismatched type and vtable definitions, turning silent UB into actionable reports. It processes about 200 million DWARF DIEs in roughly a minute using tens of GB of RAM, found about 520 ODR violations in a Photoshop unit test build, and can run inside Xcode or CI to fail links until mismatches are fixed.
AI-written summary · about
chapters (11)
- 0:00Intro
- 0:34The One Definition Rule
- 3:16Example: One Definition Rule Violation
- 8:26ODRV Behaviors
- 14:39How ORC Works
- 16:16Augmenting the Linker
- 17:12What Does an ODRV Report Look Like?
- 18:27Example: Photoshop Unit Test Application
- 22:03Take the ORC challenge!
- 22:40Use ORC for Debugging
- 23:25Improving ORC
related talks
05mDetecting Programs That Rely on Undefined Behavior
03mLightning Talk: Undefined Behaviour in C++
58mWhat is C++
01h 02mA Critical Look at the Coding Standards Landscape
16mMind the Gap (Between Your Code and Your Toolchain)
17mTool Talk: DOOP
26mServiceable Runtimes
24mDefeating the Transparency Feature of DBI
