Skip to content
Tech News
← Back to articles

Researcher Chris Domas warns compiler optimizations can silently erase security code

read original get Hacking: The Art of Exploitation, 2nd Edition" by Jon Erickson → more articles
GoKawiil Brief

At Black Hat USA, security researcher Chris Domas told David Bombal that compilers can legally strip out security-critical operations like memory-clearing code, even when source code follows best practices. He demonstrated how subtle factors such as data size, register pressure and structure layout can determine whether an optimized binary is safe or exploitable, with some byte sizes producing secure code and nearby sizes producing vulnerable output.

Why It Matters

GoKawiil's interpretation of the reporting above, not reported fact.

This shows that source-level code review alone cannot guarantee security, since the actual machine instructions running on hardware may differ dramatically from what developers wrote and reviewed. It also complicates assumptions that switching compilers or languages like Rust automatically fixes such issues, pushing teams toward testing the exact optimized binaries they ship rather than trusting source inspection.

Key Takeaways
Worth a Look

Hacking: The Art of Exploitation, 2nd Edition" by Jon Erickson — If this talk on compilers quietly undoing your security checks hooked you, this classic walks through C code, memory layout and what the machine actually executes underneath. It's a hands-on way to build the low-level intuition Chris Domas draws on when explaining why source-level safety doesn't guarantee a safe binary.

See Hacking: The Art of Exploitation, 2nd Edition" by Jon Erickson on Amazon → Affiliate link — we may earn a commission on purchases, at no extra cost to you. Product picked by AI based on this article; it is not a tested recommendation.

Source: davidbombal.com, 2026-09-12

Published there as: “Compiler Can Undo Your Security Checks”

Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.