llvm-project/compiler-rt/test/asan/TestCases
Julian Lettner 99c9d7bd63 Reland "[ASan] Do not misrepresent high value address dereferences as null dereferences"
Updated: Removed offending TODO comment.

Dereferences with addresses above the 48-bit hardware addressable range
produce "invalid instruction" (instead of "invalid access") hardware
exceptions (there is no hardware address decoding logic for those bits),
and the address provided by this exception is the address of the
instruction (not the faulting address).  The kernel maps the "invalid
instruction" to SEGV, but fails to provide the real fault address.

Because of this ASan lies and says that those cases are null
dereferences.  This downgrades the severity of a found bug in terms of
security.  In the ASan signal handler, we can not provide the real
faulting address, but at least we can try not to lie.

rdar://50366151

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D68676

> llvm-svn: 374265

llvm-svn: 374384
2019-10-10 17:19:58 +00:00
..
Android [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* 2019-06-27 20:56:04 +00:00
Darwin [sanitizer_common] Extend test after switch to posix_spawn 2019-08-19 23:47:35 +00:00
Helpers compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
Linux [ASan] Only run dlopen-mixed-c-cxx.c with static runtime 2019-09-08 16:08:54 +00:00
Posix Reland "[ASan] Do not misrepresent high value address dereferences as null dereferences" 2019-10-10 17:19:58 +00:00
Windows compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_big_alignment.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_constant_size.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_detect_custom_size_.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_instruments_all_paddings.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_loop_unpoisoning.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
alloca_overflow_partial.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_overflow_right.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_safe_access.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_underflow_left.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_vla_interact.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
asan_and_llvm_coverage_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
asan_options-help.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
atexit_stats.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
atoi_strict.c
atol_strict.c
atoll_strict.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
blacklist.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
calloc-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
contiguous_container.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
contiguous_container_crash.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage-and-lsan.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage-disabled.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage-trace-pc.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_double_free.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_locate.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_mapping.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_ppc64_mapping.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_report.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_stacks.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
deep_stack_uaf.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
deep_tail_call.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
default_blacklist.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
default_options.cpp Update compiler-rt cpplint.py 2019-09-11 21:33:06 +00:00
describe_address.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
double-free.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
error_report_callback.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
exitcode.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
force_inline_opt0.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
frexp_interceptor.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
global-address.cpp [asan] Fix tests broken by r312858 2017-09-09 20:07:45 +00:00
global-demangle.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
global-location.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
global-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
global-underflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
halt_on_error-1.c
handle_noreturn_bug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
heap-overflow-large.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
heap-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
heavy_uar_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
huge_negative_hea_oob.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
ill.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
init-order-atexit.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
initialization-blacklist.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
initialization-bug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
initialization-constexpr.cpp Update compiler-rt cpplint.py 2019-09-11 21:33:06 +00:00
initialization-nobug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
inline.cpp Avoid memory leak in ASan test 2019-09-21 07:43:55 +00:00
intercept-rethrow-exception.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
interception_failure_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
interface_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
intra-object-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-free.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-compare-errors.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-compare-null.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-compare-success.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-subtract-errors.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-subtract-success.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
large_func_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
log-path_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
longjmp.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
lsan_annotations.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
malloc-no-intercept.c [Sanitizers, test] Fix sanitizer tests on Solaris (PR 33274) 2018-01-17 12:26:04 +00:00
malloc-size-too-big.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
malloc_context_size.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
malloc_fill.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
max_redzone.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
memcmp_strict_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
memcmp_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
memset_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
non-executable-pc.cpp Limit ASan non-executable-pc test case to x86 bots 2018-07-10 19:34:46 +00:00
null_deref.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
on_error_callback.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
partial_right.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
pass-object-byval.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
pass-struct-byval-uar.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
pass-struct-byval.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
poison_partial.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
pr33372.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
print_summary.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
printf-1.c
printf-2.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
printf-3.c [asan] Disable test incompatible with new Android 2018-12-20 00:24:09 +00:00
printf-4.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
printf-5.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
printf-m.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
realloc.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
sanity_check_pure_c.c test: filter out -fPIE/-pie on Windows 2016-12-27 03:16:20 +00:00
scariness_score_test.cpp [compiler-rt] Remove some cpplint filters 2019-09-12 02:20:36 +00:00
set_shadow_test.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
sleep_after_init.c Add new ASAN_OPTION: sleep_after_init. 2017-08-02 18:48:45 +00:00
sleep_before_dying.c
small_memcpy_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
speculative_load.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
speculative_load2.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-buffer-overflow-with-position.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-buffer-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-frame-demangle.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-oob-frames.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strcasestr-1.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
strcasestr-2.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
strcasestr_strict.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
strcat-overlap.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strcat_strict.c
strchr_strict.c
strcmp_strict.c
strcpy-overlap.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strcspn-1.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strcspn-2.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strcspn_strict.c
strdup_oob_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strip_path_prefix.c
strncasecmp_strict.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
strncat-overlap.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strncat_strict.c
strncmp_strict.c Split strncmp and strncasecmp test and XFAIL one for Windows 2016-11-14 17:51:11 +00:00
strncpy-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strncpy-overlap.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strpbrk-1.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strpbrk-2.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strpbrk_strict.c
strspn-1.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strspn-2.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strspn_strict.c
strstr-1.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strstr-2.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strstr_strict.c [asan] relax strstr tests. 2016-10-24 19:07:27 +00:00
strtok.c Fix the typo in strtok.c testcase: There was a missing space in %run expansion. 2017-04-26 20:02:14 +00:00
strtol_strict.c [asan] Properly mark or disable tests that only work with shadow scale of 3 2017-11-16 23:29:19 +00:00
strtoll_strict.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
suppressions-exec-relative-location.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
suppressions-function.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
suppressions-interceptor.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
suppressions-library.cpp Stop marking 5 ASan tests as failing on NetBSD/i386 2019-09-08 16:15:18 +00:00
throw_call_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
throw_catch.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
throw_invoke_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
time_interceptor.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
uar_and_exceptions.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
unaligned_loads_and_stores.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-delete.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-free-right.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-free.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-poison.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-capture.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-conversion.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
use-after-scope-dtor-order.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-goto.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-if.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-inlined.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-loop-bug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-loop-removed.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-loop.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-nobug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-temp.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-temp2.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-types.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
verbose-log-path_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
vla_chrome_testcase.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
vla_condition_overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
vla_loop_overfow.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
zero_page_pc.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00