GeistHaus
log in · sign up

What Every C Programmer Should Know About Undefined Behavior #1/3

blog.llvm.org

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().

1 page links to this URL
Link Collection

The book "Is Parallel Programming Hard, And, If So, What Can You Do About It?" can be found at https://www.kernel.org/pub/linux/kernel/p...