llvm-project/compiler-rt/lib/asan/lit_tests
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
..
32bitConfig [ASan] create separate configs for running ASan lit tests in both 32- and 64-bit mode. Clean up RUN-lines in tests. 2013-06-07 09:38:55 +00:00
64bitConfig [ASan] create separate configs for running ASan lit tests in both 32- and 64-bit mode. Clean up RUN-lines in tests. 2013-06-07 09:38:55 +00:00
TestCases Fix a bug in the readdir_r interceptor: when we reach the end of the 2013-07-10 09:50:29 +00:00
Unit Simplify lit configs for asan/lsan/msan unit tests 2013-06-06 13:48:20 +00:00
CMakeLists.txt [ASan] create separate configs for running ASan lit tests in both 32- and 64-bit mode. Clean up RUN-lines in tests. 2013-06-07 09:38:55 +00:00
lit.cfg [ASan] Add sanity test for asan_symbolize.py script 2013-07-01 09:15:19 +00:00