llvm-project/compiler-rt/lib/asan/lit_tests/TestCases
Chandler Carruth 28c1b294b8 Fix a bug in the readdir_r interceptor: when we reach the end of the
directory stream, the entry is not written to, instead *result is set to
NULL and the entry is not written to at all.

I'm still somewhat suspicious of the correct instrumention here --
I feel like it should be marking the written range as the pointer in
*result and the length (*result)->d_reclen in case the implementation
decides not to use the passed-in entry (if that's even allowed).
Finally, the definition of 'struct dirent' analog used in the
interceptor is wrong in 32-bit mode with _FILE_OFFSET_BITS=64 as it hard
codes the use of a pointer-sized offset.

I've added a somewhat goofy test for the bug I fixed via ASan --
suggestions on how to better test the interceptor logic itself welcome.

llvm-svn: 185998
2013-07-10 09:50:29 +00:00
..
Darwin [ASan][OSX] Make sure the zones created by malloc_create_zone() are write-protected. 2013-06-28 10:01:09 +00:00
Helpers [asan] Update blacklists to use categories. 2013-07-09 22:04:28 +00:00
Linux Fix a bug in the readdir_r interceptor: when we reach the end of the 2013-07-10 09:50:29 +00:00
SharedLibs [ASan] Add sanity test for asan_symbolize.py script 2013-07-01 09:15:19 +00:00
allow_user_segv.cc
asan-symbolize-sanity-test.cc [ASan] Add sanity test for asan_symbolize.py script 2013-07-01 09:15:19 +00:00
blacklist.cc
deep_stack_uaf.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
deep_tail_call.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
deep_thread_stack.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
default_blacklist.cc
default_options.cc
dlclose-test.cc
double-free.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
force_inline_opt0.cc
free_hook_realloc.cc
global-demangle.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
global-overflow.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
heap-overflow.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
huge_negative_hea_oob.cc
init-order-atexit.cc
init-order-dlopen.cc
init-order-pthread-create.cc [ASan] Properly disable strict init-order checking when pthread_create is called 2013-07-01 16:16:41 +00:00
initialization-blacklist.cc
initialization-bug.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
initialization-constexpr.cc
initialization-nobug.cc
interface_test.cc Properly install LSan interface header, rely on sanitizer header presence in lit tests 2013-06-14 11:45:36 +00:00
invalid-free.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
ioctl.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
large_func_test.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
log-path_test.cc
log_path_fork_test.cc.disabled
lsan_annotations.cc Add cmake rules for building LSan common on Mac OS 2013-06-22 16:33:52 +00:00
malloc_fill.cc
malloc_hook.cc
memcmp_strict_test.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
memcmp_test.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
null_deref.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
on_error_callback.cc
partial_right.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
readv.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
sanity_check_pure_c.c [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
shared-lib-test.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
sleep_before_dying.c
stack-frame-demangle.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
stack-oob-frames.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
stack-overflow.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
stack-use-after-return.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
strdup_oob_test.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
strip_path_prefix.c
strncpy-overflow.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
symbolize_callback.cc
throw_call_test.cc
throw_invoke_test.cc
time_interceptor.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
unaligned_loads_and_stores.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
use-after-free-right.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
use-after-free.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
use-after-poison.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
use-after-scope-dtor-order.cc [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script 2013-06-28 15:52:44 +00:00
use-after-scope-inlined.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
use-after-scope-nobug.cc
use-after-scope-temp.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
use-after-scope.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00
wait.cc [ASan] Remove leading underscores from function names in output tests 2013-07-01 08:41:45 +00:00