summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-05-08 22:15:59 +0000
committerChris Lattner <sabre@nondot.org>2010-05-08 22:15:59 +0000
commit84d461865965192f7a71627887a0ea8e5dd5afb7 (patch)
tree506d50e42f41094c4855c3d67f2716e5b185172a /clang/lib/Sema
parent2ec6cff9d05383a88a6c5f78952993247f5c4f01 (diff)
downloadbcm5719-llvm-84d461865965192f7a71627887a0ea8e5dd5afb7.tar.gz
bcm5719-llvm-84d461865965192f7a71627887a0ea8e5dd5afb7.zip
make simplifycfg insert an llvm.trap before the 'unreachable' it introduces
when it detects undefined behavior. llvm.trap generally codegens into some thing really small (e.g. a 2 byte ud2 instruction on x86) and debugging this sort of thing is "nontrivial". For example, we now compile: void foo() { *(int*)0 = 42; } into: _foo: pushl %ebp movl %esp, %ebp ud2 Some may even claim that this is a security hole, though that seems dubious to me. This addresses rdar://7958343 - Optimizing away null dereference potentially allows arbitrary code execution llvm-svn: 103356
Diffstat (limited to 'clang/lib/Sema')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud