Chris Lattner
c7d7e0cbe0
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103356 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 22:15:59 +00:00
..
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 17:02:12 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2010-01-05 17:55:26 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-11-10 21:02:18 +00:00
2009-09-11 18:01:28 +00:00
2010-01-05 17:55:26 +00:00
2009-09-11 18:01:28 +00:00
2010-03-02 01:11:08 +00:00
2010-03-31 20:37:13 +00:00
2009-12-22 06:07:30 +00:00
2010-01-05 17:55:26 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-08 22:34:10 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-12-30 05:54:51 +00:00
2009-09-11 18:01:28 +00:00
2010-01-05 17:55:26 +00:00
2009-09-11 17:02:12 +00:00
2009-09-11 17:02:12 +00:00
2009-10-13 18:13:05 +00:00
2009-09-11 18:01:28 +00:00
2010-02-05 22:03:18 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-10-31 17:33:01 +00:00
2009-09-11 17:02:12 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 17:02:12 +00:00
2009-09-11 17:02:12 +00:00
2009-09-11 17:02:12 +00:00
2010-01-05 17:55:26 +00:00
2009-09-11 17:02:12 +00:00
2009-09-08 22:34:10 +00:00
2009-09-08 22:34:10 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2010-05-08 22:15:59 +00:00
2010-01-05 17:55:26 +00:00
2009-09-11 17:02:12 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00