| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
Properly generate lists of exported symbols for sanitizer runtimes This change adds a Python script that is invoked for the just-built sanitizer runtime to generate the list of exported symbols passed to the linker. By default, it contains interceptors and sanitizer interface functions, but can be extended with tool-specific lists. llvm-svn: 189356 | 12 年前 | |
Revert "[UBSan] Improve error message when a misalignment is due to t… (#166197) …arget de…" This reverts commit 47c54d55c9fac5ea7c87881e00f96e8c12b18174. | 8 个月前 | |
[compiler-rt] [UBSan] leave BufferedStackTrace uninit Otherwise we have to memset 2040 bytes (255 * 8) for each call Pull Request: https://github.com/llvm/llvm-project/pull/102253 | 1 年前 | |
[NFC][sanitizer] Move SymbolizedStackHolder into sanitizer_common (#77152) And replace most ClearAll() uses. | 2 年前 | |
[compiler-rt] [UBSan] leave BufferedStackTrace uninit Otherwise we have to memset 2040 bytes (255 * 8) for each call Pull Request: https://github.com/llvm/llvm-project/pull/102253 | 1 年前 | |
[sanitizers] Remove unneeded MaybeCall*DefaultOptions() and nullptr checks D28596 added SANITIZER_INTERFACE_WEAK_DEF which can guarantee *_default_options are always defined. The weak attributes on the __{asan,lsan,msan,ubsan}_default_options declarations can thus be removed. MaybeCall*DefaultOptions no longer need nullptr checks, so their call sites can just be replaced by __*_default_options. Reviewed By: #sanitizers, vitalybuka Differential Revision: https://reviews.llvm.org/D87175 | 5 年前 | |
[sanitizers] Remove unneeded MaybeCall*DefaultOptions() and nullptr checks D28596 added SANITIZER_INTERFACE_WEAK_DEF which can guarantee *_default_options are always defined. The weak attributes on the __{asan,lsan,msan,ubsan}_default_options declarations can thus be removed. MaybeCall*DefaultOptions no longer need nullptr checks, so their call sites can just be replaced by __*_default_options. Reviewed By: #sanitizers, vitalybuka Differential Revision: https://reviews.llvm.org/D87175 | 5 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Revert "[UBSan] Improve error message when a misalignment is due to t… (#166197) …arget de…" This reverts commit 47c54d55c9fac5ea7c87881e00f96e8c12b18174. | 8 个月前 | |
| 1 年前 | ||
-fsanitize=function: use type hashes instead of RTTI objects Currently we use RTTI objects to check type compatibility. To support non-unique RTTI objects, commit 5745eccef54ddd3caca278d1d292a88b2281528b added a checkTypeInfoEquality string matching to the runtime. The scheme is inefficient. _Z1fv: .long 846595819 # jmp .long .L__llvm_rtti_proxy-_Z3funv ... main: ... # Load the second word (pointer to the RTTI object) and dereference it. movslq 4(%rsi), %rax movq (%rax,%rsi), %rdx # Is it the desired typeinfo object? leaq _ZTIFvvE(%rip), %rax # If not, call __ubsan_handle_function_type_mismatch_v1, which may recover if checkTypeInfoEquality allows cmpq %rax, %rdx jne .LBB1_2 ... .section .data.rel.ro,"aw",@progbits .p2align 3, 0x0 .L__llvm_rtti_proxy: .quad _ZTIFvvE Let's replace the indirect _ZTI pointer with a type hash similar to -fsanitize=kcfi. _Z1fv: .long 3238382334 .long 2772461324 # type hash main: ... # Load the second word (callee type hash) and check whether it is expected cmpl $-1522505972, -4(%rax) # If not, fail: call __ubsan_handle_function_type_mismatch jne .LBB2_2 The RTTI object derives its name from clang::MangleContext::mangleCXXRTTI, which uses mangleType. mangleTypeName uses mangleType as well. So the type compatibility change is high-fidelity. Since we no longer need RTTI pointers in __ubsan::__ubsan_handle_function_type_mismatch_v1, let's switch it back to version 0, the original signature before e215996a2932ed7c472f4e94dc4345b30fd0c373 (2019). __ubsan::__ubsan_handle_function_type_mismatch_abort is not recoverable, so we can revert some changes from e215996a2932ed7c472f4e94dc4345b30fd0c373. Reviewed By: samitolvanen Differential Revision: https://reviews.llvm.org/D148785 | 3 年前 | |
-fsanitize=function: use type hashes instead of RTTI objects Currently we use RTTI objects to check type compatibility. To support non-unique RTTI objects, commit 5745eccef54ddd3caca278d1d292a88b2281528b added a checkTypeInfoEquality string matching to the runtime. The scheme is inefficient. _Z1fv: .long 846595819 # jmp .long .L__llvm_rtti_proxy-_Z3funv ... main: ... # Load the second word (pointer to the RTTI object) and dereference it. movslq 4(%rsi), %rax movq (%rax,%rsi), %rdx # Is it the desired typeinfo object? leaq _ZTIFvvE(%rip), %rax # If not, call __ubsan_handle_function_type_mismatch_v1, which may recover if checkTypeInfoEquality allows cmpq %rax, %rdx jne .LBB1_2 ... .section .data.rel.ro,"aw",@progbits .p2align 3, 0x0 .L__llvm_rtti_proxy: .quad _ZTIFvvE Let's replace the indirect _ZTI pointer with a type hash similar to -fsanitize=kcfi. _Z1fv: .long 3238382334 .long 2772461324 # type hash main: ... # Load the second word (callee type hash) and check whether it is expected cmpl $-1522505972, -4(%rax) # If not, fail: call __ubsan_handle_function_type_mismatch jne .LBB2_2 The RTTI object derives its name from clang::MangleContext::mangleCXXRTTI, which uses mangleType. mangleTypeName uses mangleType as well. So the type compatibility change is high-fidelity. Since we no longer need RTTI pointers in __ubsan::__ubsan_handle_function_type_mismatch_v1, let's switch it back to version 0, the original signature before e215996a2932ed7c472f4e94dc4345b30fd0c373 (2019). __ubsan::__ubsan_handle_function_type_mismatch_abort is not recoverable, so we can revert some changes from e215996a2932ed7c472f4e94dc4345b30fd0c373. Reviewed By: samitolvanen Differential Revision: https://reviews.llvm.org/D148785 | 3 年前 | |
[NFC][sanitizer] Move InitTlsSize into InitializePlatformEarly (#108921) | 1 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[sanitizer][Fuchsia] Add callback at end of __sanitizer_startup_hook (#131886) Sanitizers using this hook on Fuchsia can define this function to do any extra stuff at the end of the startup hook. For now this is only used by HWASan which needs to explicitly be initialized before libc extensions are intitialized. | 1 年前 | |
[sanitizer] Internalize .preinit_array variables We can use an internal linkage variable to make it clear the variable is not exported. The special section .preinit_array is a GC root. Pull Request: https://github.com/llvm/llvm-project/pull/98584 | 2 年前 | |
| 1 年前 | ||
[NFC][sanitizer] Replace a few AppendF with Append | 2 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[compiler-rt][sanitizer] add Haiku support (#134772) Co-authored-by: Jérôme Duval <jerome.duval@gmail.com> | 1 年前 | |
[ubsan] Support static linking with standalone runtime (#80943) The standalone runtime (not -fsanitize-minimal-runtime/-fsanitize-trap=undefined) installs some signal handlers using real_sigaction. With static linking (-static/-static-pie), the called REAL(sigaction) is null, leading to an immediate segfault, which is confusing (#51538). Fix #51538 by bailing out. // REQUIRES: librt_has_multf3 from https://reviews.llvm.org/D109709 actually disabled the test because librt_has_* features are only for compiler-rt/test/builtins. The test does not reproduce for me: libclang_rt.builtins.a or libgcc. Revert the REQUIRES. | 2 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Remove a few straggler ".cc"s in compiler-rt/lib llvm-svn: 367589 | 6 年前 | |
Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO This follows up after b7692bc3e9ad2691fc07261904b88fb15f30696b "[UBSan] Fix isDerivedFromAtOffset on iOS ARM64" fixed the RTTI comparison in isDerivedFromAtOffset on just one platform and then a25a2c7c9a7e1e328a5bd8274d2d86b1fadc4692 "Always compare C++ typeinfo (based on libstdc++ implementation)" extended that fix to more platforms. But there is another RTTI comparison for -fsanitize=function generated in clang's CodeGenFunction::EmitCall as just a pointer comparison. For SANITIZER_NON_UNIQUE_TYPEINFO platforms this needs to be extended to also do string comparison. For that, __ubsan_handle_function_type_mismatch[_abort] takes the two std::type_info pointers as additional parameters now, checks them internally for potential equivalence, and returns without reporting failure if they turn out to be equivalent after all. (NORETURN needed to be dropped from the _abort variant for that.) Also these functions depend on ABI-specific RTTI now, so needed to be moved from plain UBSAN_SOURCES (ubsan_handlers.h/cc) to UBSAN_CXXABI_SOURCES (ubsan_handlers_cxx.h/cc), but as -fsanitize=function is only supported in C++ mode that's not a problem. Differential Revision: https://reviews.llvm.org/D60760 llvm-svn: 359759 | 7 年前 | |
[PAC][compiler-rt][UBSan] Strip signed vptr instead of authenticating it (#100153) vptr cannot be authenticated without knowing the class type if it was signed with type discrimination. Co-authored-by: Oliver Hunt <oliver@apple.com> | 1 年前 | |
[compiler-rt] [ubsan] Use the itanium type info lookup for mingw targets Differential Revision: https://reviews.llvm.org/D90571 | 5 年前 | |
Revert "[compiler-rt][ubsan] Add support for f16 (#129624)" This reverts commit 23a30e68888e764b2f4d32e51d415b50fa5f5cac. The commit has broken some build bots. | 1 年前 | |
[ubsan] Use internal_memcpy to copy ubsan bits size (#121586) While fetching amounts of bits used to correctly display ubsan value reinterpret_cast was used, however as noted by Jakub Jelínek in https://github.com/llvm/llvm-project/pull/96240 discussion it might cause issues due to potentially unaligned memory access. The patch addresses this problem. Co-authored-by: Vladislav Aranov <vladislav.aranov@ericsson.com> | 1 年前 | |
Reland [asan][windows] Eliminate the static asan runtime on windows (#107899) This reapplies 8fa66c6ca7272268747835a0e86805307b62399c ([asan][windows] Eliminate the static asan runtime on windows) for a second time. That PR bounced off the tests because it caused failures in the other sanitizer runtimes, these have been fixed by only building interception, sanitizer_common, and asan with /MD, and continuing to build the rest of the runtimes with /MT. This does mean that any usage of the static ubsan/fuzzer/etc runtimes will mean you're mixing different runtime library linkages in the same app, the interception, sanitizer_common, and asan runtimes are designed for this, however it does result in some linker warnings. Additionally, it turns out when building in release-mode with LLVM_ENABLE_PDBs the build system forced /OPT:ICF. This totally breaks asan's "new" method of doing "weak" functions on windows, and so /OPT:NOICF was explicitly added to asan's link flags. --------- Co-authored-by: Amy Wishnousky <amyw@microsoft.com> | 1 年前 | |
Enable weak hooks on darwin Summary: By default, darwin requires a definition for weak interface functions at link time. Adding the '-U' link flag with each weak function allows these weak interface functions to be used without definitions, which mirrors behavior on linux and windows. Reviewers: compnerd, eugenis Subscribers: kubabrecka, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D28203 llvm-svn: 291417 | 9 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 12 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 7 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 7 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 7 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 年前 |