What Every C Programmer Should Know About Undefined Behavior #1/3 - The LLVM Project Blog
People occasionally ask why LLVM-compiled code sometimes generates SIGTRAP signals when the optimizer is turned on. After digging in, they find that Clang generated a "ud2" instruction (assuming X86 code) - the same as is generated by __builtin_trap().
What Every C Programmer Should Know About Undefined Behavior #1/3 By Chris Lattner May 13, 2011 #optimization , #Clang 9 minute read People occasionally ask why LLVM-compiled code sometimes generates SIGTRAP signals when the optimizer is turned on. After digging in, they find that Clang generated a "ud2" instruction (assuming X86 code) - the same as is generated by __builtin_trap(). There are several issues at work here, all centering around undefined behavior in C code and how LLVM handles it. This blog post (the first in a series of three) tries to explain some of these issues so that you ca
Explore this link on the map →saved by
related reading
- What Every C Programmer Should Know About Undefined Behavior #3/3 - The LLVM Project Blogblog.llvm.org
- What Every C Programmer Should Know About Undefined Behavior #2/3 - The LLVM Project Blogblog.llvm.org
- Undefined behavior, and the Sledgehammer Principle | The Pasturethephd.dev
- A Gentle Introduction to LLVM IR · mcyoungmcyoung.xyz
- A Gentle Introduction to LLVM IR · mcyoungmcyoung.xyz
- Zig: Already More Knowable Than C - Andrew Kelleyandrewkelley.me
- Compilers - What Every Programmer Should Know About Compiler Optimizations | Microsoft Learnlearn.microsoft.com
- Compiler Optimizations Are Hard Because They Forget - Faultlorefaultlore.com
- abseil / Performance Hintsabseil.io
- LLVM is Smarter Than Meblog.sulami.xyz
- Data representation – CS 61cs61.seas.harvard.edu
- Optimization of Computer Programs in Cicps.u-strasbg.fr