6f4be19b57 
								
							 
						 
						
							
							
								
								[nolibc] Change internal syscall API to remove reliance on libc's errno.  
							
							... 
							
							
							
							This change moves to a model where the error value of a system call is
potentially contained in the return value itself rather than being
implicit in errno.  The helper function internal_iserror can be used
to extract the error value from a return value.  On platforms other
than Linux/x86_64 this still uses errno, but other platforms are free
to port their error handling to this new model.
Differential Revision: http://llvm-reviews.chandlerc.com/D756 
llvm-svn: 181436 
							
						 
						
							2013-05-08 14:43:49 +00:00  
				
					
						
							
							
								 
						
							
								0d8cc4a2d2 
								
							 
						 
						
							
							
								
								[sanitizer] Fix build breakage in Go TSan.  
							
							... 
							
							
							
							llvm-svn: 181428 
							
						 
						
							2013-05-08 13:59:30 +00:00  
				
					
						
							
							
								 
						
							
								af179b8d63 
								
							 
						 
						
							
							
								
								[sanitizer] Move GetStackTrace from ASan to sanitizer_common.  
							
							... 
							
							
							
							llvm-svn: 181424 
							
						 
						
							2013-05-08 12:45:55 +00:00  
				
					
						
							
							
								 
						
							
								a0e28a7aaa 
								
							 
						 
						
							
							
								
								[Sanitizer] Kill the remainders of platform defines in favor of SANITIZER_ defines  
							
							... 
							
							
							
							llvm-svn: 178627 
							
						 
						
							2013-04-03 07:24:35 +00:00  
				
					
						
							
							
								 
						
							
								f8109dd0f8 
								
							 
						 
						
							
							
								
								[libsanitizer] Unmapping the old cache partially invalidates the memory layout, so add  
							
							... 
							
							
							
							a flag to skip cache update for cases when that's unacceptable (e.g. lsan).
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 178000 
							
						 
						
							2013-03-26 10:34:37 +00:00  
				
					
						
							
							
								 
						
							
								0af672326a 
								
							 
						 
						
							
							
								
								[sanitizer] Replace more platform checks with SANITIZER_ constants.  
							
							... 
							
							
							
							llvm-svn: 177400 
							
						 
						
							2013-03-19 14:33:38 +00:00  
				
					
						
							
							
								 
						
							
								06d3aa4884 
								
							 
						 
						
							
							
								
								[Sanitizer] Change MemoryMappingLayout methods to also report memory protection flags (for future use in leak checker). Patch by Sergey Matveev.  
							
							... 
							
							
							
							llvm-svn: 176931 
							
						 
						
							2013-03-13 06:51:02 +00:00  
				
					
						
							
							
								 
						
							
								92cc1a6d24 
								
							 
						 
						
							
							
								
								[ASan] don't call strerr from functions that map memory, since this results in malloc().  
							
							... 
							
							
							
							llvm-svn: 176800 
							
						 
						
							2013-03-11 10:21:28 +00:00  
				
					
						
							
							
								 
						
							
								aadd1f2ad6 
								
							 
						 
						
							
							
								
								[Sanitizer] use raw syscall instead of _exit() function on Linux  
							
							... 
							
							
							
							llvm-svn: 175622 
							
						 
						
							2013-02-20 13:54:32 +00:00  
				
					
						
							
							
								 
						
							
								9211bd33ec 
								
							 
						 
						
							
							
								
								[Sanitizer] Make temporary filename depend on user ID  
							
							... 
							
							
							
							llvm-svn: 175424 
							
						 
						
							2013-02-18 07:17:12 +00:00  
				
					
						
							
							
								 
						
							
								39313b780d 
								
							 
						 
						
							
							
								
								[Sanitizer] make internal_open have the same interface as libc version  
							
							... 
							
							
							
							llvm-svn: 174187 
							
						 
						
							2013-02-01 15:58:46 +00:00  
				
					
						
							
							
								 
						
							
								bda64b4d40 
								
							 
						 
						
							
							
								
								[sanitizer] make the error messages from sanitizer_common contain the actual tool name  
							
							... 
							
							
							
							llvm-svn: 174059 
							
						 
						
							2013-01-31 14:11:21 +00:00  
				
					
						
							
							
								 
						
							
								0632dd410c 
								
							 
						 
						
							
							
								
								tsan: fix the message (tsan is not asan)  
							
							... 
							
							
							
							llvm-svn: 173784 
							
						 
						
							2013-01-29 09:39:58 +00:00  
				
					
						
							
							
								 
						
							
								6f604b5007 
								
							 
						 
						
							
							
								
								[asan/tsan] when unmapping a chunk of user memory, apply madvise(MADV_DONTNEED) to the corresponding chunk of shadow memory. Also update sanitizer_allocator64_testlib.cc  
							
							... 
							
							
							
							llvm-svn: 171144 
							
						 
						
							2012-12-27 07:37:24 +00:00  
				
					
						
							
							
								 
						
							
								9806628792 
								
							 
						 
						
							
							
								
								[sanitizer] introduce MmapFixedOrDie and use it in SizeClassAllocator64  
							
							... 
							
							
							
							llvm-svn: 170099 
							
						 
						
							2012-12-13 05:36:00 +00:00  
				
					
						
							
							
								 
						
							
								e1a7f338a3 
								
							 
						 
						
							
							
								
								tsan: dynamic history size  
							
							... 
							
							
							
							introduces history_size parameter that can be used to control trace size at startup
llvm-svn: 168786 
							
						 
						
							2012-11-28 12:19:50 +00:00  
				
					
						
							
							
								 
						
							
								f22c697f58 
								
							 
						 
						
							
							
								
								[asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.  
							
							... 
							
							
							
							llvm-svn: 168517 
							
						 
						
							2012-11-23 15:38:49 +00:00  
				
					
						
							
							
								 
						
							
								da78be74f3 
								
							 
						 
						
							
							
								
								tsan: slightly relax requirements for lazy shadow memory (can overlap and may not be properly aligned)  
							
							... 
							
							
							
							it's problematic on windows where allocation granularity is much larger than page size
llvm-svn: 167466 
							
						 
						
							2012-11-06 16:48:46 +00:00  
				
					
						
							
							
								 
						
							
								e86c632015 
								
							 
						 
						
							
							
								
								tsan: fix debug output  
							
							... 
							
							
							
							llvm-svn: 167463 
							
						 
						
							2012-11-06 15:54:34 +00:00  
				
					
						
							
							
								 
						
							
								a0be3e2c68 
								
							 
						 
						
							
							
								
								tsan: better diagnostics for failed mmap()  
							
							... 
							
							
							
							llvm-svn: 167462 
							
						 
						
							2012-11-06 15:39:16 +00:00  
				
					
						
							
							
								 
						
							
								58358897a3 
								
							 
						 
						
							
							
								
								[Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to determine whether error reports are printed to terminal  
							
							... 
							
							
							
							llvm-svn: 167298 
							
						 
						
							2012-11-02 15:18:34 +00:00  
				
					
						
							
							
								 
						
							
								cb13fff13d 
								
							 
						 
						
							
							
								
								[asan] properly report mmap failure  
							
							... 
							
							
							
							llvm-svn: 165214 
							
						 
						
							2012-10-04 07:21:09 +00:00  
				
					
						
							
							
								 
						
							
								56faa551b9 
								
							 
						 
						
							
							
								
								tsan: fix mac build  
							
							... 
							
							
							
							llvm-svn: 165004 
							
						 
						
							2012-10-02 12:58:14 +00:00  
				
					
						
							
							
								 
						
							
								27d5b37c38 
								
							 
						 
						
							
							
								
								tsan: output tid's in reports  
							
							... 
							
							
							
							llvm-svn: 164998 
							
						 
						
							2012-10-02 11:52:05 +00:00  
				
					
						
							
							
								 
						
							
								97ca306641 
								
							 
						 
						
							
							
								
								[Sanitizer] Hoist functions to get/set stack size and re-exec from memory-sanitizer branch to sanitizer_common  
							
							... 
							
							
							
							llvm-svn: 164020 
							
						 
						
							2012-09-17 09:12:39 +00:00  
				
					
						
							
							
								 
						
							
								cc62211fbf 
								
							 
						 
						
							
							
								
								[Sanitizer] Rename ProcessMaps to MemoryMappingLayout and fix Windows build by providing stub implementation  
							
							... 
							
							
							
							llvm-svn: 162671 
							
						 
						
							2012-08-27 13:48:48 +00:00  
				
					
						
							
							
								 
						
							
								ad855e9438 
								
							 
						 
						
							
							
								
								[asan] better diagnostics for mmap failure  
							
							... 
							
							
							
							llvm-svn: 161874 
							
						 
						
							2012-08-14 15:18:40 +00:00  
				
					
						
							
							
								 
						
							
								03d32ecd4f 
								
							 
						 
						
							
							
								
								tsan: Go language support  
							
							... 
							
							
							
							llvm-svn: 159754 
							
						 
						
							2012-07-05 16:18:28 +00:00  
				
					
						
							
							
								 
						
							
								961276af26 
								
							 
						 
						
							
							
								
								[Sanitizer] Extend a symbolizer code. Implemented for Linux only. Use dl_iterate_phdr to get virtual addresses of mapped module sections. To symbolize an address from a module, map this module to memory and obtain pointers to debug info sections. Later these pointers can be passed to constructor of DWARF context-in-memory from LLVM DebugInfo lib.  
							
							... 
							
							
							
							llvm-svn: 159652 
							
						 
						
							2012-07-03 08:24:14 +00:00  
				
					
						
							
							
								 
						
							
								e8cee12ce2 
								
							 
						 
						
							
							
								
								tsan/asan: first try on msvc atomics  
							
							... 
							
							
							
							llvm-svn: 159443 
							
						 
						
							2012-06-29 18:00:38 +00:00  
				
					
						
							
							
								 
						
							
								d32d537d63 
								
							 
						 
						
							
							
								
								[asan] get rid of libc's sscanf as it causes infinite recursion on Fedora.  
							
							... 
							
							
							
							llvm-svn: 159424 
							
						 
						
							2012-06-29 13:05:36 +00:00  
				
					
						
							
							
								 
						
							
								cf7d233ac0 
								
							 
						 
						
							
							
								
								[TSan] kill some linux-specific code in favor of code in common runtime: reuse wrappers for mmap routines, ProcessMaps iterator, thread stack calculation  
							
							... 
							
							
							
							llvm-svn: 158657 
							
						 
						
							2012-06-18 09:42:39 +00:00  
				
					
						
							
							
								 
						
							
								58a3c58ec9 
								
							 
						 
						
							
							
								
								[Sanitizer] move different wrappers from TSan to common sanitizer runtime  
							
							... 
							
							
							
							llvm-svn: 158655 
							
						 
						
							2012-06-18 08:44:30 +00:00  
				
					
						
							
							
								 
						
							
								8c4dcd72e3 
								
							 
						 
						
							
							
								
								[Sanitizer] Use mmaped buffer in DumpProcessMaps to avoid large stack frames  
							
							... 
							
							
							
							llvm-svn: 158502 
							
						 
						
							2012-06-15 07:41:23 +00:00  
				
					
						
							
							
								 
						
							
								40e5128412 
								
							 
						 
						
							
							
								
								[Sanitizer] move ShadowRangeIsAvailable and several defines to common runtime  
							
							... 
							
							
							
							llvm-svn: 158499 
							
						 
						
							2012-06-15 07:29:14 +00:00  
				
					
						
							
							
								 
						
							
								e4a889866d 
								
							 
						 
						
							
							
								
								[Sanitizer] move atomic ops, min/max and sort to commnon runtime  
							
							... 
							
							
							
							llvm-svn: 158496 
							
						 
						
							2012-06-15 07:00:31 +00:00  
				
					
						
							
							
								 
						
							
								70afb91636 
								
							 
						 
						
							
							
								
								[Sanitizer] move more portability wrappers to common runtime: sleep, _exit, abort, atexit, pthread_self  
							
							... 
							
							
							
							llvm-svn: 158493 
							
						 
						
							2012-06-15 06:37:34 +00:00  
				
					
						
							
							
								 
						
							
								ae1e171b72 
								
							 
						 
						
							
							
								
								[Sanitizer] move DumpProcessMap and DisableCoreDumper to common runtime  
							
							... 
							
							
							
							llvm-svn: 158490 
							
						 
						
							2012-06-15 06:08:19 +00:00  
				
					
						
							
							
								 
						
							
								c70d1086f6 
								
							 
						 
						
							
							
								
								[Sanitizer] move rest of mmap routines to common sanitizer runtime  
							
							... 
							
							
							
							llvm-svn: 158452 
							
						 
						
							2012-06-14 14:42:58 +00:00  
				
					
						
							
							
								 
						
							
								40d5b772e5 
								
							 
						 
						
							
							
								
								[Sanitizer] Switch to common mmap/munmap routines in ASan run-time.  
							
							... 
							
							
							
							llvm-svn: 158078 
							
						 
						
							2012-06-06 16:15:07 +00:00  
				
					
						
							
							
								 
						
							
								ee07290628 
								
							 
						 
						
							
							
								
								[Sanitizer] Move more functions/constants to sanitizer_common.  
							
							... 
							
							
							
							llvm-svn: 158056 
							
						 
						
							2012-06-06 09:26:25 +00:00  
				
					
						
							
							
								 
						
							
								5bbf8290a7 
								
							 
						 
						
							
							
								
								[Sanitizer] rename sanitizer_defs.h to sanitizer_internal_defs.h  
							
							... 
							
							
							
							llvm-svn: 158001 
							
						 
						
							2012-06-05 14:25:27 +00:00  
				
					
						
							
							
								 
						
							
								7ac77d6b29 
								
							 
						 
						
							
							
								
								[Sanitizer] add sanitizer_posix.cc. Move more various functions into sanitizer_libc: sscanf, munmap, memchr  
							
							... 
							
							
							
							llvm-svn: 157994 
							
						 
						
							2012-06-05 09:49:25 +00:00