| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Darwin][UBSan][Sanitizer] abort_on_error ubsan test fix for arm64 The current darwin abort_on_error test specifically tests for a division by zero undefined behavior. However arm does not trap by default for this behavior. x86 signals the abort, which is why the test passes on x86. This patch updates the test to test for a case where the ubsan runtime specifically calls Die() to trigger an abort by default. rdar://92108564 Differential Revision: https://reviews.llvm.org/D124480 | 4 年前 | |
[Sanitizers] intercept FreeBSD procctl Reviewers: vitalybuka, emaster Reviewed-By: viatelybuka Differential Revision: https://reviews.llvm.org/D127069 | 4 年前 | |
[LoongArch] Backport LoongArch code from upstream community LLVM16 Issue:https://gitee.com/open_harmony/dashboard?issue_id=I9Q0LP Signed-off-by: caiwei <wei.cai@archermind.com> | 2 年前 | |
[Sanitizers] intercept ttyent api on FreeBSD. and ttyentpath separately on NetBSD. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D109843 | 4 年前 | |
[nfc][asan][android] Fix test after D124057 | 4 年前 | |
compiler-rt: Rename cc files below test/sanitizer_common to cpp See r367803 and similar other changes. llvm-svn: 367863 | 6 年前 | |
[NFC][asan] XFAIL a test on THUMB Followup to D114934 | 4 年前 | |
compiler-rt: Rename cc files below test/sanitizer_common to cpp See r367803 and similar other changes. llvm-svn: 367863 | 6 年前 | |
Correct ctype(3) functions with NLS on NetBSD Summary: The setlocale(3) function reloads the ctype(3) arrays from external files. This happens behind the scenes in the internals of libc (citrus library, runes functions etc). ctype(3) functions like isspace(3) can be provided with two variations on NetBSD: inlined or via a global symbol in libc: #if defined(_NETBSD_SOURCE) && !defined(_CTYPE_NOINLINE) && \ !defined(__cplusplus) #include <sys/ctype_inline.h> #else #include <sys/ctype_bits.h> #endif The in-lined versions are de-facto array lookup operations. #define isspace(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_S)) After setting setlocale(3) the ctype(3) arrays (_ctype_tab_, _toupper_tab_, _tolower_tab_) are reload behind the scenes and they are required to be marked as initialized. Set them initialized inside the common setlocale(3) interceptor. The arrays are of size of 257 elements: 0..255 + 1 (EOF). This corrects errors on NetBSD/amd64 in applications prebuilt with MSan. Sponsored by <The NetBSD Foundation> Reviewers: vitalybuka, dvyukov, joerg Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42020 llvm-svn: 326008 | 8 年前 | |
Fix test in external_symbolizer_path.cpp, by adding a REQUIRES: static-lib. Follow-up to https://reviews.llvm.org/D94563. | 5 年前 | |
[asan] fix fopen interceptor to not crash if path is NULL llvm-svn: 256182 | 10 年前 | |
tsan: fix XMM register corruption in hacky call The compiler does not recognize HACKY_CALL as a call (we intentionally hide it from the compiler so that it can compile non-leaf functions as leaf functions). To compensate for that hacky call thunk saves and restores all caller-saved registers. However, it saves only general-purposes registers and does not save XMM registers. This is a latent bug that was masked up until a recent "NFC" commit d736002e90 ("tsan: move memory access functions to a separate file"), which allowed more inlining and exposed the 10-year bug. Save and restore caller-saved XMM registers (all) as well. Currently the bug manifests as e.g. frexp interceptor messes the return value and the added test fails with: i=8177 y=0.000000 exp=4 Reviewed By: melver Differential Revision: https://reviews.llvm.org/D113742 | 4 年前 | |
compiler-rt: Rename cc files below test/sanitizer_common to cpp See r367803 and similar other changes. llvm-svn: 367863 | 6 年前 | |
[asan] Run background thread for asan only on THUMB As in D114934, or lsan crashes on the same bot. | 4 年前 | |
compiler-rt: Rename cc files below test/sanitizer_common to cpp See r367803 and similar other changes. llvm-svn: 367863 | 6 年前 | |
[sanitizers] Fixes strndup API behaviour when intercepted by sanitizers Sanitizers ignore flag allocator_may_return_null=1 in strndup() calls. When OOM is emulated, this causes to the unexpected crash. Committed by pgousseau on behalf of "Kostyantyn Melnik, kmnls.kmnls@gmail.com" Reviewed by: pgousseau Differential Revision: https://reviews.llvm.org/D126452 | 4 年前 | |
sanitizer_common: fix up onprint.cpp test more D112630 ("sanitizer_common: fix up onprint.cpp test") added O_CREAT, but we also need O_TRUNC b/c the file may not exist, or may exist as well. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112788 | 4 年前 | |
[SanitizerCommon] Print the current value of options when printing out help. Summary: Previously it wasn't obvious what the default value of various sanitizer options were. A very close approximation of the "default values" for the options are the current value of the options at the time of printing the help output. In the case that no other options are provided then the current values are the default values (apart from help). ASAN_OPTIONS=help=1 ./program This patch causes the current option values to be printed when the help output is enabled. The original intention for this patch was to append (Default: <value>) to an option's help text. However because this is technically wrong (and misleading) I've opted to append (Current Value: <value>) instead. When trying to implement a way of displaying the default value of the options I tried another solution where the default value used in *.inc files were used to create compile time strings that where used when printing the help output. This solution was not satisfactory for several reasons: * Stringifying the default values with the preprocessor did not work very well in several cases. Some options contain boolean operators which no amount of macro expansion can get rid of. * It was much more invasive than this patch. Every sanitizer had to be changed. * The settings of __<sanitizer>_default_options() are ignored. For those reasons I opted for the solution in this patch. rdar://problem/42567204 Reviewers: kubamracek, yln, kcc, dvyukov, vitalybuka, cryptoad, eugenis, samsonov Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D69546 | 6 年前 | |
compiler-rt: Rename cc files below test/sanitizer_common to cpp See r367803 and similar other changes. llvm-svn: 367863 | 6 年前 | |
compiler-rt: Rename cc files below test/sanitizer_common to cpp See r367803 and similar other changes. llvm-svn: 367863 | 6 年前 | |
[sanitizer] Skip stack symbolization when not required for print format Adds a check to avoid symbolization when printing stack traces if the stack_trace_format flag does not need it. While there is a symbolize flag that can be turned off to skip some of the symbolization, SymbolizePC() still unconditionally looks up the module name and offset. Avoid invoking SymbolizePC() at all if not needed. This is an efficiency improvement when dumping all stack traces as part of the memory profiler in D87120, for large stripped apps where we want to symbolize as a post pass. Differential Revision: https://reviews.llvm.org/D88361 | 5 年前 | |
[Sanitizers][test] XFAIL long double tests on Solaris/sparc As reported in Issue #41838, clang doesn't correctly implement long double on 32-bit Solaris/SPARC: the psABI requires this to be an 128-bit type. Four sanitizer tests currently FAIL for this reason. While there is a WIP patch to fix clang (D89130 <https://reviews.llvm.org/D89130>), it isn't complete yet and I've hit so many brick walls while trying to finish it that I'm unsure if I ever will. This patch therefore XFAILs those tests in the meantime. Tested on sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D119016 | 4 年前 | |
compiler-rt: Rename cc files below test/sanitizer_common to cpp See r367803 and similar other changes. llvm-svn: 367863 | 6 年前 | |
compiler-rt: Rename cc files below test/sanitizer_common to cpp See r367803 and similar other changes. llvm-svn: 367863 | 6 年前 | |
Add RingBufferLink Signed-off-by: hq <hq87201986@163.com> | 3 个月前 | |
[test] Remove references to -fexperimental-new-pass-manager in tests This has been the default for a while and we're in the process of removing the legacy PM optimization pipeline. | 4 年前 | |
[Clang][Driver] Add Bounds and Thread to SupportsCoverage list Summary: This permits combining -fsanitize-coverage with -fsanitize=bounds or -fsanitize=thread. Note that, GCC already supports combining these. Tested: - Add Clang end-to-end test checking IR is generated for both combinations of sanitizers. - Several previously failing TSAN tests now pass. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=45831 Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: #sanitizers, dvyukov, nickdesaulniers, cfe-commits Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D79628 | 6 年前 | |
[sanitizer coverage] write the pc-table at the process exit The current code writes the pc-table at the process startup, which may happen before the common_flags() are initialized. Move writing to the process end. This is consistent with how we write the counters and avoids the problem with the uninitalized flags. Add prints if verbosity>=1. Reviewed By: kostik Differential Revision: https://reviews.llvm.org/D110119 | 4 年前 | |
[Clang][Driver] Add Bounds and Thread to SupportsCoverage list Summary: This permits combining -fsanitize-coverage with -fsanitize=bounds or -fsanitize=thread. Note that, GCC already supports combining these. Tested: - Add Clang end-to-end test checking IR is generated for both combinations of sanitizers. - Several previously failing TSAN tests now pass. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=45831 Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: #sanitizers, dvyukov, nickdesaulniers, cfe-commits Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D79628 | 6 年前 | |
[Clang][Driver] Add Bounds and Thread to SupportsCoverage list Summary: This permits combining -fsanitize-coverage with -fsanitize=bounds or -fsanitize=thread. Note that, GCC already supports combining these. Tested: - Add Clang end-to-end test checking IR is generated for both combinations of sanitizers. - Several previously failing TSAN tests now pass. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=45831 Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: #sanitizers, dvyukov, nickdesaulniers, cfe-commits Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D79628 | 6 年前 | |
[Clang][Driver] Add Bounds and Thread to SupportsCoverage list Summary: This permits combining -fsanitize-coverage with -fsanitize=bounds or -fsanitize=thread. Note that, GCC already supports combining these. Tested: - Add Clang end-to-end test checking IR is generated for both combinations of sanitizers. - Several previously failing TSAN tests now pass. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=45831 Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: #sanitizers, dvyukov, nickdesaulniers, cfe-commits Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D79628 | 6 年前 | |
compiler-rt: Rename cc files below test/sanitizer_common to cpp See r367803 and similar other changes. llvm-svn: 367863 | 6 年前 | |
[sancov] add tracing for loads and store add tracing for loads and stores. The primary goal is to have more options for data-flow-guided fuzzing, i.e. use data flow insights to perform better mutations or more agressive corpus expansion. But the feature is general puspose, could be used for other things too. Pipe the flag though clang and clang driver, same as for the other SanitizerCoverage flags. While at it, change some plain arrays into std::array. Tests: clang flags test, LLVM IR test, compiler-rt executable test. Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D113447 | 4 年前 | |
[compiler-rt] Disable coverage trace pc guard tests on Thumb These are failing on our silent bot: https://lab.llvm.org/staging/#/builders/162/builds/358 $ <run cmd> main foo bar baz SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard-dso.cpp.tmp.2122517.sancov: 2 PCs written SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard-dso.cpp.tmp_2.so.2122517.sancov: 1 PCs written SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard-dso.cpp.tmp_1.so.2122517.sancov: 1 PCs written $ <sancov cmd> ERROR: Coverage points in binary and .sancov file do not match. Also reproduces if you build for Thumb on v8 hardware. Doesn't fail when built with Arm only code so I guess the Thumb mode bit in the PCs might be the issue. | 4 年前 | |
[Clang][Driver] Add Bounds and Thread to SupportsCoverage list Summary: This permits combining -fsanitize-coverage with -fsanitize=bounds or -fsanitize=thread. Note that, GCC already supports combining these. Tested: - Add Clang end-to-end test checking IR is generated for both combinations of sanitizers. - Several previously failing TSAN tests now pass. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=45831 Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: #sanitizers, dvyukov, nickdesaulniers, cfe-commits Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D79628 | 6 年前 | |
[compiler-rt] Disable coverage trace pc guard tests on Thumb These are failing on our silent bot: https://lab.llvm.org/staging/#/builders/162/builds/358 $ <run cmd> main foo bar baz SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard-dso.cpp.tmp.2122517.sancov: 2 PCs written SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard-dso.cpp.tmp_2.so.2122517.sancov: 1 PCs written SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard-dso.cpp.tmp_1.so.2122517.sancov: 1 PCs written $ <sancov cmd> ERROR: Coverage points in binary and .sancov file do not match. Also reproduces if you build for Thumb on v8 hardware. Doesn't fail when built with Arm only code so I guess the Thumb mode bit in the PCs might be the issue. | 4 年前 | |
[Sanitizers][test] XFAIL long double tests on Solaris/sparc As reported in Issue #41838, clang doesn't correctly implement long double on 32-bit Solaris/SPARC: the psABI requires this to be an 128-bit type. Four sanitizer tests currently FAIL for this reason. While there is a WIP patch to fix clang (D89130 <https://reviews.llvm.org/D89130>), it isn't complete yet and I've hit so many brick walls while trying to finish it that I'm unsure if I ever will. This patch therefore XFAILs those tests in the meantime. Tested on sparcv9-sun-solaris2.11. Differential Revision: https://reviews.llvm.org/D119016 | 4 年前 | |
[NFC][msan] Move setlocale test into sanitizer_common | 5 年前 | |
[CMake] Use normalized Windows target triples Changes the default Windows target triple returned by GetHostTriple.cmake from the old environment names (which we wanted to move away from) to newer, normalized ones. This also requires updating all tests to use the new systems names in constraints. Differential Revision: https://reviews.llvm.org/D47381 llvm-svn: 339307 | 7 年前 | |
[sanitizer] More string interceptors: strstr, strcasestr, strspn, strcspn, strpbrk. Patch by Maria Guseva. Differential Revision: http://reviews.llvm.org/D9017 llvm-svn: 238406 | 11 年前 | |
[sanitizer] Add strnlen to the common interceptors Summary: Adds strnlen to the common interceptors, under the existing flag intercept_strlen. Removes the now-duplicate strnlen interceptor from asan and msan. This adds strnlen to tsan, which previously did not intercept it. Adds a new test of strnlen to the sanitizer_common test cases. Reviewers: samsonov Subscribers: zhaoqin, llvm-commits, kcc Differential Revision: http://reviews.llvm.org/D18397 llvm-svn: 264195 | 10 年前 | |
[sanitizer] More string interceptors: strstr, strcasestr, strspn, strcspn, strpbrk. Patch by Maria Guseva. Differential Revision: http://reviews.llvm.org/D9017 llvm-svn: 238406 | 11 年前 | |
[sanitizer] More string interceptors: strstr, strcasestr, strspn, strcspn, strpbrk. Patch by Maria Guseva. Differential Revision: http://reviews.llvm.org/D9017 llvm-svn: 238406 | 11 年前 | |
[sanitizer] More string interceptors: strstr, strcasestr, strspn, strcspn, strpbrk. Patch by Maria Guseva. Differential Revision: http://reviews.llvm.org/D9017 llvm-svn: 238406 | 11 年前 | |
[sanitizer] Add suffix to report file name For those using a GUI, it can be very helpful to have a particular suffix appended to the report file name, so it can be opened with a double-click. (see also: https://github.com/google/sanitizers/issues/951) Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D46546 | 5 年前 | |
[sanitizer] Make test pass with InternalSymbolizer | 4 年前 | |
[sanitizer_common][test] Enable tests on SPARC Unfortunately, the sanitizer_common tests are disabled on many targets that are supported by sanitizer_common, making it easy to miss issues with that support. This patch enables SPARC testing. Beside the enabling proper, the patch fixes (together with D91607 <https://reviews.llvm.org/D91607>) the failures of the symbolize_pc.cpp, symbolize_pc_demangle.cpp, and symbolize_pc_inline.cpp tests. They lack calls to __builtin_extract_return_addr. When those are added, they PASS when compiled with gcc. clang incorrectly doesn't implement a non-default __builtin_extract_return_addr on several targets, SPARC included. Because __builtin_extract_return_addr(__builtin_return_addr(0)) is quite a mouthful and I'm uncertain if the code needs to compile with msvc which appparently has it's own _ReturnAddress, I've introduced __sanitizer_return_addr to hide the difference and complexity. Because on 32-bit SPARC __builtin_extract_return_addr differs when the calling function returns a struct, I've added a testcase for that. There are a couple more tests failing on SPARC that I will deal with separately. Tested on sparcv9-sun-solaris2.11, amd64-pc-solaris2.11, and x86_64-pc-linux-gnu. Differential Revision: https://reviews.llvm.org/D91608 | 4 年前 | |
[sanitizer_common][test] Enable tests on SPARC Unfortunately, the sanitizer_common tests are disabled on many targets that are supported by sanitizer_common, making it easy to miss issues with that support. This patch enables SPARC testing. Beside the enabling proper, the patch fixes (together with D91607 <https://reviews.llvm.org/D91607>) the failures of the symbolize_pc.cpp, symbolize_pc_demangle.cpp, and symbolize_pc_inline.cpp tests. They lack calls to __builtin_extract_return_addr. When those are added, they PASS when compiled with gcc. clang incorrectly doesn't implement a non-default __builtin_extract_return_addr on several targets, SPARC included. Because __builtin_extract_return_addr(__builtin_return_addr(0)) is quite a mouthful and I'm uncertain if the code needs to compile with msvc which appparently has it's own _ReturnAddress, I've introduced __sanitizer_return_addr to hide the difference and complexity. Because on 32-bit SPARC __builtin_extract_return_addr differs when the calling function returns a struct, I've added a testcase for that. There are a couple more tests failing on SPARC that I will deal with separately. Tested on sparcv9-sun-solaris2.11, amd64-pc-solaris2.11, and x86_64-pc-linux-gnu. Differential Revision: https://reviews.llvm.org/D91608 | 4 年前 | |
[sanitizer_common][test] Enable tests on SPARC Unfortunately, the sanitizer_common tests are disabled on many targets that are supported by sanitizer_common, making it easy to miss issues with that support. This patch enables SPARC testing. Beside the enabling proper, the patch fixes (together with D91607 <https://reviews.llvm.org/D91607>) the failures of the symbolize_pc.cpp, symbolize_pc_demangle.cpp, and symbolize_pc_inline.cpp tests. They lack calls to __builtin_extract_return_addr. When those are added, they PASS when compiled with gcc. clang incorrectly doesn't implement a non-default __builtin_extract_return_addr on several targets, SPARC included. Because __builtin_extract_return_addr(__builtin_return_addr(0)) is quite a mouthful and I'm uncertain if the code needs to compile with msvc which appparently has it's own _ReturnAddress, I've introduced __sanitizer_return_addr to hide the difference and complexity. Because on 32-bit SPARC __builtin_extract_return_addr differs when the calling function returns a struct, I've added a testcase for that. There are a couple more tests failing on SPARC that I will deal with separately. Tested on sparcv9-sun-solaris2.11, amd64-pc-solaris2.11, and x86_64-pc-linux-gnu. Differential Revision: https://reviews.llvm.org/D91608 | 4 年前 | |
[Sanitizer][Darwin] Mark test UNSUPPORTED instead of XFAIL This is test is failing/passing depending on the host OS version. Need to investigate/fix before re-enabling. rdar://95982696 | 4 年前 | |
[Sanitizer] Fix a possible write to freed memory in the wcrtomb interceptor Summary: r357240 added an interceptor for wctomb, which uses a temporary local buffer to make sure we don't write to unallocated memory. This patch applies the same technique to wcrtomb, and adds some additional tests for this function. Reviewers: vitalybuka, eugenis Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D59984 llvm-svn: 357889 | 7 年前 | |
[Sanitizer] Add interceptor for wctomb Summary: This is required to avoid msan false positives for code using this function (although generally one should avoid using this function in favor of wcrtomb). Reviewers: eugenis, EricWF, vitalybuka Subscribers: srhines, kubamracek, fedor.sergeev, delcypher, llvm-commits, #sanitizers Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D59548 llvm-svn: 357240 | 7 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 8 年前 | ||
| 5 年前 | ||
| 10 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 个月前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 7 年前 | ||
| 11 年前 | ||
| 10 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 7 年前 |