JJulian Lettner[Sanitizer][Darwin][NFC] Small SANITIZER_APPLE cleanup
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[gn build] slighly reformat files to make sync script work | 4 年前 | |
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 年前 | |
[ubsan] Check implicit casts in ObjC for-in statements Check that the implicit cast from id used to construct the element variable in an ObjC for-in statement is valid. This check is included as part of a new objc-cast sanitizer, outside of the main 'undefined' group, as (IIUC) the behavior it's checking for is not technically UB. The check can be extended to cover other kinds of invalid casts in ObjC. Partially addresses: rdar://12903059, rdar://9542496 Differential Revision: https://reviews.llvm.org/D71491 | 5 年前 | |
Revert "[ubsan] Simplify ubsan_GetStackTrace" This reverts commit 63f2d1f4d4b8ee284b4ab977242e322a9458a168. I don't quite understand why, but this causes a linker error for me and a number of buildbots: /home/npopov/repos/llvm-project/compiler-rt/lib/ubsan/../sanitizer_common/sanitizer_stacktrace.h:130: error: undefined reference to '__sanitizer::BufferedStackTrace::UnwindImpl(unsigned long, unsigned long, void*, bool, unsigned int)' | 4 年前 | |
[NFC][Sanitizer] Pull up GetStackTrace into sanitizer_common We already independently declare GetStackTrace in all (except TSan) sanitizer runtime headers. Lets move it to sanitizer_stacktrace.h to have one canonical way to fill in a BufferedStackFrame. Also enables us to use it in sanitizer_common itself. This patch defines GetStackTrace for TSan and moves the function from ubsan_diag.cc to ubsan_diag_standalone.cc to avoid duplicate symbols for the UBSan-ASan runtime. Other than that this patch just moves the code out of headers and into the correct namespace. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58651 llvm-svn: 355039 | 7 年前 | |
[sanitizer] Simplify __sanitizer::BufferedStackTrace::UnwindImpl implementations Intended to be NFC. D102046 relies on the refactoring for stack boundaries. | 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 年前 | |
[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 年前 | |
[ubsan] Check implicit casts in ObjC for-in statements Check that the implicit cast from id used to construct the element variable in an ObjC for-in statement is valid. This check is included as part of a new objc-cast sanitizer, outside of the main 'undefined' group, as (IIUC) the behavior it's checking for is not technically UB. The check can be extended to cover other kinds of invalid casts in ObjC. Partially addresses: rdar://12903059, rdar://9542496 Differential Revision: https://reviews.llvm.org/D71491 | 5 年前 | |
[ubsan] Check implicit casts in ObjC for-in statements Check that the implicit cast from id used to construct the element variable in an ObjC for-in statement is valid. This check is included as part of a new objc-cast sanitizer, outside of the main 'undefined' group, as (IIUC) the behavior it's checking for is not technically UB. The check can be extended to cover other kinds of invalid casts in ObjC. Partially addresses: rdar://12903059, rdar://9542496 Differential Revision: https://reviews.llvm.org/D71491 | 5 年前 | |
compiler-rt: Rename .cc files in lib/ubsan to .cpp. See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367452 | 6 年前 | |
[NFC] Fix endif comments to match with include guard | 4 年前 | |
sanitizer_common: make internal/external headers compatible This is a follow up to 4f3f4d672254 ("sanitizer_common: fix __sanitizer_get_module_and_offset_for_pc signature mismatch") which fixes a similar problem for msan build. I am getting the following error compiling a unit test for code that uses sanitizer_common headers and googletest transitively includes sanitizer interface headers: In file included from third_party/gwp_sanitizers/singlestep_test.cpp:3: In file included from sanitizer_common/sanitizer_common.h:19: sanitizer_interface_internal.h:41:5: error: typedef redefinition with different types ('struct __sanitizer_sandbox_arguments' vs 'struct __sanitizer_sandbox_arguments') } __sanitizer_sandbox_arguments; common_interface_defs.h:39:3: note: previous definition is here } __sanitizer_sandbox_arguments; Reviewed By: melver Differential Revision: https://reviews.llvm.org/D119546 | 4 年前 | |
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: Rename .cc files in lib/ubsan to .cpp. See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367452 | 6 年前 | |
compiler-rt: Rename .cc files in lib/ubsan to .cpp. See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367452 | 6 年前 | |
Update ubsan_interface.inc for D71491 (second try) I mistyped the ubsan objc_cast handler names on the first try. Testing: ./bin/llvm-lit projects/compiler-rt/test/asan/X86_64HDarwinConfig/TestCases/Darwin/interface_symbols_darwin.cpp | 5 年前 | |
[sanitizer] Remove max_len parameter from InternalScopedString InternalScopedString uses InternalMmapVector internally so it can be resized dynamically as needed. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D98751 | 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 年前 | |
[asan] Remove Asan, Ubsan support of RTEMS and Myriad Differential Revision: https://reviews.llvm.org/D104279 | 4 年前 | |
Revert "[ubsan] Simplify ubsan_GetStackTrace" This reverts commit 63f2d1f4d4b8ee284b4ab977242e322a9458a168. I don't quite understand why, but this causes a linker error for me and a number of buildbots: /home/npopov/repos/llvm-project/compiler-rt/lib/ubsan/../sanitizer_common/sanitizer_stacktrace.h:130: error: undefined reference to '__sanitizer::BufferedStackTrace::UnwindImpl(unsigned long, unsigned long, void*, bool, unsigned int)' | 4 年前 | |
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 年前 | |
[compiler-rt] [ubsan] Use the itanium type info lookup for mingw targets Differential Revision: https://reviews.llvm.org/D90571 | 5 年前 | |
[compiler-rt] [ubsan] Use the itanium type info lookup for mingw targets Differential Revision: https://reviews.llvm.org/D90571 | 5 年前 | |
[Sanitizer][Darwin][NFC] Small SANITIZER_APPLE cleanup We introduced SANITIZER_APPLE here: https://reviews.llvm.org/D126263 | 3 年前 | |
[ubsan] Check implicit casts in ObjC for-in statements Check that the implicit cast from id used to construct the element variable in an ObjC for-in statement is valid. This check is included as part of a new objc-cast sanitizer, outside of the main 'undefined' group, as (IIUC) the behavior it's checking for is not technically UB. The check can be extended to cover other kinds of invalid casts in ObjC. Partially addresses: rdar://12903059, rdar://9542496 Differential Revision: https://reviews.llvm.org/D71491 | 5 年前 | |
compiler-rt: Rename .cc files in lib/ubsan to .cpp. See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367452 | 6 年前 | |
compiler-rt: Rename .cc files in lib/ubsan to .cpp. See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367452 | 6 年前 | |
compiler-rt: Rename .cc files in lib/ubsan to .cpp. See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated references to renamed files found by that. llvm-svn: 367452 | 6 年前 | |
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 年前 |