1. Reland "[ASan] Do not misrepresent high value address dereferences as (details)
Commit 99c9d7bd6369a7505b86d7ea75a573265436e34a by jlettner
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.
Reviewed By: vitalybuka
Differential Revision:
> llvm-svn: 374265
llvm-svn: 374384
The file was modifiedcompiler-rt/lib/asan/asan_errors.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_common.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_win.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
The file was addedcompiler-rt/test/asan/TestCases/Posix/high-address-dereference.c