AAiden Grossman[compiler-rt][HWAsan] Partially revert to fix test
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[compiler-rt][HWAsan] Partially revert to fix test bc27843761417148b5733855da9f791552ed3b42 changed the offset that we use so that the valid runs do not conflict with libc. I adjusted every value that could have conflicted which actually started causing one of the lines that should fail into one that did not. | 8 个月前 | |
[compiler-rt] Update some tests to pass with lit internal shell. (#157910) The lit internal shell needs environment variable definitions to be preceded by the 'env' keyword. This PR add that to tests that were missing it. | 10 个月前 | |
compiler-rt: Rename .cc file in test/hwasan to .cpp Like r367463, but for test/hwasan. llvm-svn: 367849 | 6 年前 | |
[sanitizer] Select non-internal frames in ReportErrorSummary (#77406) Summary contains one line and should point to user code instead of internal compiler-rt location. TSAN already does that. | 2 年前 | |
[test][HWASAN] Force interceptors tests for memcmp and bcmp call interceptor (#71215) | 2 年前 | |
[sanitizers] include build ids in stacks on linux. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D114294 | 4 年前 | |
Require lld for hwasan tests. We're using relocations that are unsupported by the version of gold on the bot, so force the use of lld. One of the tests is already using lld, so this should be safe. llvm-svn: 368111 | 6 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
[HWASan] Leave pointer tagged when calling memmove. Fixes a false positive that occurs when a user-implemented memmove is instrumented by HWASan. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D118180 | 4 年前 | |
[hwasan] Fix rare false negative (zero tag) in stack-uar.c (#69374) stack-uar.c is flaky (1 in 256 executions) because the random tag may be zero (https://github.com/llvm/llvm-project/issues/69221). This patch works around the issue in the same way as deep-recursion.c (https://github.com/llvm/llvm-project/commit/aa4dfd3736dd1c2e0263eacd09bd613c5784ea73), by falling back to a neighboring object, which must have a different (non-zero) tag. This patch also does a minor cleanup of the aforementioned deep-recursion.c, for consistency with stack-uar.c. Co-authored-by: Thurston Dang <thurston@google.com> | 2 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
[hwasan] Fixing false invalid-free with disabled tagging (#67169) This problem was accidentally discovered by the internal symbolizer, but it's relevant for external one as well, see the test. If we just disable tagging, there may still be tagged allocations that have already been freed. After disabling tagging, these tagged allocations can be released to the user as-is, which would later break the "invalid-free" check. We cannot just disable the "invalid-free" check with disabled tagging, because if we re-enable tagging, the issue still applies to allocations created when it was disabled. The fix is to continue tagging with zero even if tagging is disabled. This makes the "disabled" mode less efficient, but this is not the primary use case. | 2 年前 | |
[RISC-V][HWASAN] Adjust lit test support for RISC-V HWASAN feature Reviewed by: vitalybuka Differential Revision: https://reviews.llvm.org/D131344 | 3 年前 | |
Revert "[HWASan] unflake test" https://reviews.llvm.org/D150742 is the fix. This reverts commit edd0981e71af87a686365d40e6410a8a377c153d. | 3 年前 | |
[HWASan] rename left/right to before/after. left/right is a weird way to refer to address ordering. Reviewed By: eugenis, vitalybuka Differential Revision: https://reviews.llvm.org/D132622 | 3 年前 | |
[HWASan] Apply TagMaskByte to every global tag. Previously we only applied it to the first one, which could allow subsequent global tags to exceed the valid number of bits. Reviewed By: hctim Differential Revision: https://reviews.llvm.org/D112853 | 4 年前 | |
[sanitizer] Select non-internal frames in ReportErrorSummary (#77406) Summary contains one line and should point to user code instead of internal compiler-rt location. TSAN already does that. | 2 年前 | |
[TEST][hwasan] Check more details in overflow test (#67059) | 2 年前 | |
Fix some page size assumptions in the HWASan tests. Reviewers: fmayer, vitalybuka Reviewed By: fmayer, vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/134941 | 1 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
[clang][compiler-rt][test] Removed dirname command substitutions from tests (#105754) This patch rewrites tests in clang and compiler-rt that uses bash command substitution syntax $() to execute the dirname command. This is done so that the tests can be run using lit's internal shell. Fixes https://github.com/llvm/llvm-project/issues/102384. | 1 年前 | |
Reapply "[HWASan] symbolize stack overflows" (#102951) (#104036) This reverts commit d4f6fcf5aaa0911a91317c0b06779f13077d6b58. Relanding with fixed obj_offset calculation (precedence of operations was wrong), and the suggestion in https://github.com/llvm/llvm-project/pull/95308#discussion_r1714317539 | 1 年前 | |
Do not use dirname in test (#103395) Suggested in https://github.com/llvm/llvm-project/pull/95308#discussion_r1714317539 | 1 年前 | |
| 1 年前 | ||
[HWASan] add test for hwasan_handle_longjmp ignore logic (#83359) | 2 年前 | |
[HWASan] Intercept setjmp/longjmp on x86_64. Reviewed By: xiangzhangllvm Differential Revision: https://reviews.llvm.org/D109790 | 4 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
Re-enable lto.c test on ARM64 Tested on Android and ARM Linux and it passes. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156269 | 2 年前 | |
[hwasan] Fix allocator alignment. Summary: Fix hwasan allocator not respecting the requested alignment when it is higher than a page, but still within primary (i.e. [2048, 65536]). Reviewers: pcc, hctim, cryptoad Subscribers: #sanitizers, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D79656 | 6 年前 | |
[HWASAN] Modify HwasanAllocate to set the size to 1 if requested size is 0 This should keep it consistent with LSAN and ASAN, Reviewed By: vitalybuka, MaskRay Differential Revision: https://reviews.llvm.org/D143438 | 3 年前 | |
[hwasan] Disable test with internal_symbolizer | 2 年前 | |
[HWASan] Use page aliasing on x86_64. Userspace page aliasing allows us to use middle pointer bits for tags without untagging them before syscalls or accesses. This should enable easier experimentation with HWASan on x86_64 platforms. Currently stack, global, and secondary heap tagging are unsupported. Only primary heap allocations get tagged. Note that aliasing mode will not work properly in the presence of fork(), since heap memory will be shared between the parent and child processes. This mode is non-ideal; we expect Intel LAM to enable full HWASan support on x86_64 in the future. Reviewed By: vitalybuka, eugenis Differential Revision: https://reviews.llvm.org/D98875 | 5 年前 | |
[hwasan] Flush stderr/stdout in tests (#114083) The x86_64_lam_qemu buildbots started failing (https://lab.llvm.org/buildbot/#/builders/139/builds/5462/steps/2/logs/stdio). Based on the logs, it appears the HWASan check is correct but it did not match the stderr/stdout output. This patch attempts to fix the issue by flushing stderr/stdout as appropriate. | 1 年前 | |
hwasan: Ignore loads and stores of size 0. Now that memory intrinsics are instrumented, it's more likely that CheckAddressSized will be called with size 0. (It was possible before with IR like: %val = load [0 x i8], [0 x i8]* %ptr but I don't think clang will generate IR like that and the optimizer would normally remove it by the time it got anywhere near our pass anyway). The right thing to do in both cases is to disable the addressing checks (since the underlying memory intrinsic is a no-op), so that's what we do. Differential Revision: https://reviews.llvm.org/D56465 llvm-svn: 350683 | 7 年前 | |
[hwasan] Flush stderr/stdout in tests (#114083) The x86_64_lam_qemu buildbots started failing (https://lab.llvm.org/buildbot/#/builders/139/builds/5462/steps/2/logs/stdio). Based on the logs, it appears the HWASan check is correct but it did not match the stderr/stdout output. This patch attempts to fix the issue by flushing stderr/stdout as appropriate. | 1 年前 | |
[test][HWASAN] Force interceptors tests for memcmp and bcmp call interceptor (#71215) | 2 年前 | |
[HWASAN] Enable memcpy and memmove interceptors (#71217) | 2 年前 | |
[HWASAN] Enable memcpy and memmove interceptors (#71217) | 2 年前 | |
[hwasan] Use ErrorAction::Recover in interceptors (#74000) | 2 年前 | |
[HWASAN] Add memset interceptor (#71244) Co-authored-by: Vitaly Buka <vitalybuka@google.com> | 2 年前 | |
[hwasan] Fixup mmap tagging regions Reviewed By: thurston Differential Revision: https://reviews.llvm.org/D152893 | 3 年前 | |
[HWASan] Properly handle musttail calls. Fixes a compile error when the clang::musttail attribute is used. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D118712 | 4 年前 | |
[sanitizer,test] Restore -fno-sized-deallocation coverage -fsized-deallocation was recently made the default for C++17 onwards (#90373). While here, remove unneeded -faligned-allocation. | 1 年前 | |
Set an output file name for the override-new-delete.cpp test. The android_compile.py script requires one. llvm-svn: 362764 | 7 年前 | |
[HWASan] Add __hwasan_init to .preinit_array. Fixes segfaults on x86_64 caused by instrumented code running before shadow is set up. Reviewed By: pcc Differential Revision: https://reviews.llvm.org/D118171 | 4 年前 | |
[compiler-rt][test] Add REQUIRES: shell in tests that use the ulimit command (#105339) This patch adds the REQUIRES: shell directive to six test files that use the ulimit command, ensuring these tests are only run in environments where a full POSIX-compliant shell is available. The lit internal shell does not use or support the ulimit command, which causes failures when running tests with LIT_USE_INTERNAL_SHELL=1 ninja check-compiler-rt Specifically, one of the errors encountered is: `` # RUN: at line 4 ulimit -s 1000 # executed command: ulimit -s 1000 # .---command stderr------------ # | 'ulimit': command not found # ----------------------------- # error: command failed with exit status: 127 `` Since, the lit internal shell doesn't support ulimit`, adding this requirement prevents these tests from failing in the lit internal shell, thereby improving the reliability of the test suite in environments where the full shell is not available. This change is relevant for [[RFC] Enabling the Lit Internal Shell by Default](https://discourse.llvm.org/t/rfc-enabling-the-lit-internal-shell-by-default/80179/3) fixes: #102398 | 1 年前 | |
[hwasan] Implement print_module_map flag. Reviewers: kcc, pcc Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D57130 llvm-svn: 352150 | 7 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
[HWASAN] Fix a memory leak in realloc-test.cpp Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D146180 | 3 年前 | |
[HWASan] Disable stack, globals and force callbacks for x86_64. Subsequent patches will implement page-aliasing mode for x86_64, which will initially only work for the primary heap allocator. We force callback instrumentation to simplify the initial aliasing implementation. Reviewed By: vitalybuka, eugenis Differential Revision: https://reviews.llvm.org/D98069 | 5 年前 | |
[compiler-rt][hwasan] Update register-dump-read.c test Since d564cfb53c71dbbbd46b6719f5fe53d70313de45 moved __hwasan_tag_mismatch4 this test has been reporting a frame 0 of __hwasan_tag_mismatch_v2. This failure can be seen on our bots: https://lab.llvm.org/buildbot/#/builders/185/builds/170 Before the change: #0 0xaaaaba100e40 in main <...>/register-dump-read.c:21:10 After the change: #0 0xaaaab8494bec in __hwasan_tag_mismatch_v2 <...>/hwasan/hwasan_tag_mismatch_aarch64.S:147 #1 0xaaaab84b4df8 in main <..>/register-dump-read.c:14:10 Update the test to check for a main frame as either frame 0 or frame 1. | 4 年前 | |
[sanitizer] Select non-internal frames in ReportErrorSummary (#77406) Summary contains one line and should point to user code instead of internal compiler-rt location. TSAN already does that. | 2 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
compiler-rt: Rename .cc file in test/hwasan to .cpp Like r367463, but for test/hwasan. llvm-svn: 367849 | 6 年前 | |
[test][hwasan] Remove mistaken XFAIL from test OnUnmap tags to zero already. | 2 年前 | |
[hwasan] Record allocation thread id in HeapAllocationRecord Extend HeapAllocationRecord to record allocation thread id, print thread id in memory allocation stack trace. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D147215 | 3 年前 | |
[hwasan] fix false positive when hwasan-match-all-tag flag is enabled and short granules are used When hwasan-match-all-tag flag is enabled and short granules are used, at the point checking if this is a short tag case, the tag from pointer is stored in X16 register, which breaks the assumption that tag from shadow memory is stored in X16 register, this will cause a false positive. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D149252 | 3 年前 | |
[hwasan] Always untag short granule in shadow. Fixes a regression when the allocator is disabled, and a dirty allocation is re-used. This only occurs when the allocator is disabled, so a test-only fix, but still necessary. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D108650 | 4 年前 | |
Revert "[driver] Fix sanitizer libc++ runtime linking (#120370)" This reverts commit 9af5de320b77d3757ea2b7e3d85c67f88dfbabb5. Reason: buildbot breakage (https://lab.llvm.org/buildbot/#/builders/24/builds/3394/steps/10/logs/stdio) "Unexpectedly Passed Tests (1): llvm-libc++-shared.cfg.in :: libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp" | 1 年前 | |
[hwasan] Fix rare false negative (zero tag) in two more test cases (#69491) stack-uas.c and stack-history-length.c both have -hwasan-record-stack-history=libcall, which makes the stack base tag fully randomized. They may therefore sometimes have a zero tag for a stack allocated variable, resulting in a false negative (https://github.com/llvm/llvm-project/issues/69221#issuecomment-1767322411). This patch applies the same workaround as used for deep-recursion.c (https://github.com/llvm/llvm-project/commit/aa4dfd3736dd1c2e0263eacd09bd613c5784ea73) and stack-uar.c (https://github.com/llvm/llvm-project/commit/ddf1de20a3f7db3bca1ef6ba7e6cbb90aac5fd2d): have two adjacent stack-allocated variables, and use whichever is not zero-tagged. These are the last remaining test cases that use -hwasan-record-stack-history=libcall. stack-uas flakiness spotted in the wild: https://lab.llvm.org/buildbot/#/builders/269/builds/549/steps/11/logs/stdio stack-history-length: https://lab.llvm.org/buildbot/#/builders/269/builds/537 Co-authored-by: Thurston Dang <thurston@google.com> | 2 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
[hwasan] Workaround unsupported AssignmentTrackingPass (#76547) Temporarily fix for issue #76545 Hwasan does not attach tags to @llvm.dbg.assign. It's not clear if we can attach tags to @llvm.dbg.assign. For now we just disable the path replacing llvm.dbg.declare with llvm.dbg.assign. It may reduce the quality of interactive debugging with HWASAN, but usually it's a smaller priority for sanitizers than the quality if reports. | 2 年前 | |
[hwasan] Make stack variables output consistent with globals (#76197) | 2 年前 | |
[HWASan] Add basic stack tagging support for LAM. Adds the basic instrumentation needed for stack tagging. Currently does not support stack short granules or TLS stack histories, since a different code path is followed for the callback instrumentation we use. We may simply wait to support these two features until we switch to a custom calling convention. Patch By: xiangzhangllvm, morehouse Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102901 | 5 年前 | |
[hwasan] Workaround unsupported AssignmentTrackingPass (#76547) Temporarily fix for issue #76545 Hwasan does not attach tags to @llvm.dbg.assign. It's not clear if we can attach tags to @llvm.dbg.assign. For now we just disable the path replacing llvm.dbg.declare with llvm.dbg.assign. It may reduce the quality of interactive debugging with HWASAN, but usually it's a smaller priority for sanitizers than the quality if reports. | 2 年前 | |
[hwasan] Fix stack tag mismatch report (#81939) Existing code worked only for local, recorder FP, and the faulty address are the same 1 MiB page. Now, instead of guessing FP, we guess variable address. We need to try just two cases of addresses around of faulty one. Fixes https://github.com/google/sanitizers/issues/1723 | 2 年前 | |
[hwasan] Make stack variables output consistent with globals (#76197) | 2 年前 | |
[hwasan] Make stack variables output consistent with globals (#76197) | 2 年前 | |
Fix some page size assumptions in the HWASan tests. Reviewers: fmayer, vitalybuka Reviewed By: fmayer, vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/134941 | 1 年前 | |
[test][hwasan] Update test expectation for LAM We cat run LAM tests on QEMU. | 2 年前 | |
[hwasan] Record allocation thread id in HeapAllocationRecord Extend HeapAllocationRecord to record allocation thread id, print thread id in memory allocation stack trace. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D147215 | 3 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
[HWASAN] Support short granules in __hwasan_test_shadow Reviewed By: thurston Differential Revision: https://reviews.llvm.org/D149430 | 3 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
[hwasan] Properly restore SP tag on exceptions Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D152036 | 3 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
[hwasan] Fix forward '[hwasan] Flush stderr/stdout in tests (#114083)' 3754fc1e9af38951aa00181c0e8110174d3f94fd broke the build because subsequent checks depend on the line numbers https://lab.llvm.org/buildbot/#/builders/174/builds/7534/steps/6/logs/FAIL__HWAddressSanitizer-x86_64__use-after-free_c | 1 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
Enable hwasan-use-after-scope by default This has been in use for a long time without any issues. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156267 | 2 年前 | |
[HWASan] fix broken test | 2 年前 | |
Remove stable-runtime from many tests They pass on x86_64 host, arm64 host, and Android. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D156273 | 2 年前 | |
[HWASan] rename left/right to before/after. left/right is a weird way to refer to address ordering. Reviewed By: eugenis, vitalybuka Differential Revision: https://reviews.llvm.org/D132622 | 3 年前 | |
[hwasan] do not check if freed pointer belonged to allocator. In that case it is very likely that there will be a tag mismatch anyway. We handle the case that the pointer belongs to neither of the allocators by getting a nullptr from allocator.GetBlockBegin. Reviewed By: hctim, eugenis Differential Revision: https://reviews.llvm.org/D108383 | 4 年前 | |
[hwasan] Fix wild free tests on x86. | 4 年前 | |
[hwasan] do not check if freed pointer belonged to allocator. In that case it is very likely that there will be a tag mismatch anyway. We handle the case that the pointer belongs to neither of the allocators by getting a nullptr from allocator.GetBlockBegin. Reviewed By: hctim, eugenis Differential Revision: https://reviews.llvm.org/D108383 | 4 年前 |