Go to file
Benjamin Kramer 054faa5a48 Sema: Warn on sizeof on binary ops on decayed arrays.
The array will decay into a pointer, creating an unexpected result.
sizeof(array + int) is an easy to make typo for sizeof(array) + int.

This was motivated by a NetBSD security bug, used sizeof(key - r) instead of
sizeof(key) - r, reducing entropy in a random number generator.
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_cprng.c.diff?r1=1.14&r2=1.15&only_with_tag=MAIN&f=h

Differential Revision: http://llvm-reviews.chandlerc.com/D571

llvm-svn: 178371
2013-03-29 21:43:21 +00:00
clang Sema: Warn on sizeof on binary ops on decayed arrays. 2013-03-29 21:43:21 +00:00
clang-tools-extra modularize - Fixed broken array use (asserted in tests). Renamed KindType enum. 2013-03-28 18:38:43 +00:00
compiler-rt [tsan] restore performance critical inlining in tsan: remove static from ALWAYS_INLINE, use ALWAYS_INLINE USED for critical functions. 2013-03-29 09:44:16 +00:00
debuginfo-tests Remove IR scenario tests. 2013-03-15 20:52:10 +00:00
libclc Update the copyright coredits -- Happy new year 2013! 2013-01-01 10:00:19 +00:00
libcxx Test case was forming the wrong limits when size_t != unsigned long. 2013-03-29 21:22:22 +00:00
libcxxabi Bruce Mitchener: Typo fixes. 2013-02-15 15:48:49 +00:00
lld [ELF] Add dynamic hash table and get simple dynamic libraries working with Hexagon 2013-03-29 00:53:25 +00:00
lldb 1 breakpoint is a breakpoint not a breakpoints. 2013-03-29 21:01:03 +00:00
llvm Add clang.arc.used to ModuleHasARC so ARC always runs if said call is present in a module. 2013-03-29 21:15:23 +00:00
polly RegisterPasses: Improve comments 2013-03-23 21:35:52 +00:00