| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[compiler-rt] Allow 3 simultaneous interceptors on Linux Rework Linux (and *BSD) interceptors to allow for up to 3 (2 for *BSD) simultaneous interceptors. See code comments for details. The main motivation is to support new sampling sanitizers (in the spirit of GWP-ASan), that have to intercept few functions. Unfortunately, the reality is that there are user interceptors that exist in the wild. To support foreign user interceptors, foreign dynamic analysis interceptors, and compiler-rt interceptors all at the same time, including any combination of them, this change enables up to 3 interceptors on Linux (2 on *BSD). v2: * Revert to to the simpler "weak wrapper -(alias)-> __interceptor" scheme on architectures that cannot implement a trampoline efficiently due to complexities of resolving a preemptible symbol (PowerPC64 ELFv2 global entry, and i386 PIC). * Avoid duplicate intercepted functions in gen_dynamic_list.py, due to matching __interceptor_X and ___interceptor_X. * Fix s390 __tls_get_offset. Reviewed By: dvyukov, MaskRay, vitalybuka Differential Revision: https://reviews.llvm.org/D151085 | 3 年前 | |
[Runtimes] Default build must use its own output dirs (#168266) Post-commit fix of #164794 reported at https://github.com/llvm/llvm-project/pull/164794#issuecomment-3536253493 LLVM_LIBRARY_OUTPUT_INTDIR and LLVM_RUNTIME_OUTPUT_INTDIR is used by AddLLVM.cmake as output directories. Unless we are in a bootstrapping-build, It must not point to directories found by find_package(LLVM) which may be read-only directories. MLIR for instance sets thesese variables to its own build output directory, so should the runtimes. | 8 个月前 | |
[sanitizer_common] Add arm64e module type (#166018) This will fix some symbolication failures on arm64e machines when the symbolicator passes the (wrong) architecture string to atos. | 8 个月前 | |
Revert "sanitizers: increase .clang-format columns to 100" This reverts commit 5d1df6d220f1d6f726d9643848679d781750db64. There is a strong objection to this change: https://reviews.llvm.org/D106436#2905618 Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D106847 | 4 年前 | |
[compiler-rt][sanitizer] add Haiku support (#134772) Co-authored-by: Jérôme Duval <jerome.duval@gmail.com> | 1 年前 | |
[compiler-rt] Remove redundant checks. (#95753) Since __sancov_default_options and __asan_default_suppressions are weak definitions, not weak references (declarations) the checks of equality of addresses of these symbols to zero is not needed. So we can completely remove MaybeCallSancovDefaultOptions and use __sancov_default_options instead directly. gcc-14 emits -Waddress warning to such checks. | 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] NFC: Fix trivial typo Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D77457 | 4 年前 | |
sanitizer_common: prefix thread-safety macros with SANITIZER_ Currently we use very common names for macros like ACQUIRE/RELEASE, which cause conflicts with system headers. Prefix all macros with SANITIZER_ to avoid conflicts. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D116652 | 4 年前 | |
sanitizer_allocator.cpp: Ensure at least sizeof(void*) alignment Some platforms (e.g. 64-bit CHERI) have stronger alignment requirements on values returned from allocators. For all other platforms this does not result in any functional change. Reviewed By: cjappl, vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/84440 | 1 年前 | |
[NFC][sanitizer] Pass user region into OnMapSecondary | 3 年前 | |
compiler-rt: Rename .cc file in lib/sanitizer_common 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 (many) references to renamed files found by that. llvm-svn: 367463 | 6 年前 | |
[compiler-rt] Replace INLINE with inline This fixes the clash with BSD headers. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D87562 | 5 年前 | |
[sanitizer] Lazy initialize AllocatorGlobalStats This allow to have no InitLinkerInitialized and let AllocatorGlobalStats accept registration before allocator initialization. | 3 年前 | |
[TySan] Intercept malloc_size on Apple platforms. (#122133) After https://github.com/llvm/llvm-project/pull/120563 malloc_size also needs intercepting on Apple platforms, otherwise all type-sanitized binaries crash on startup with an objc error: realized class 0x12345 has corrupt data pointer: malloc_size(0x567) = 0 PR: https://github.com/llvm/llvm-project/pull/122133 | 1 年前 | |
[ASan] [HWASan] Add __sanitizer_ignore_free_hook() (#96749) This change adds a new weak API function which makes the sanitizer ignore the call to free(), and implements the functionality in ASan and HWAsan. The runtime that implements this hook can then call free() at a later point again on the same pointer (and making sure the hook returns zero so that the memory will actually be freed) when it's actually ready for the memory to be cleaned up. This is needed in order to implement an sanitizer-compatible version of Chrome's BackupRefPtr algorithm, since process-wide double-shimming of malloc/free does not work on some platforms. Requested and designed by @c01db33f (Mark) from Project Zero. --------- Co-authored-by: Mark Brand <markbrand@google.com> | 2 年前 | |
[sanitizer_common] Introduce SANITIZER_MMAP_BEGIN macro (#147645) To prepare for other platforms, such as 64-bit AIX, that have a non-zero mmap beginning address. --------- Co-authored-by: David Justo <david.justo.1996@gmail.com> | 1 年前 | |
[compiler-rt] [sanitizer] avoid UB in allocator (#126977) | 1 年前 | |
[sanitizer] Replace ALIGNED with alignas C++11 alignas is already used extensively. alignas must precede static, so adjust the ordering accordingly. msan.cpp: Clang 15 doesn't allow __attribute__((visibility("default"))) alignas(16). Use the order alignas(16) SANITIZER_INTERFACE_ATTRIBUTE. Tested with Clang 7. Pull Request: https://github.com/llvm/llvm-project/pull/98958 | 2 年前 | |
[sanitizer] Warn if allocator size exceeds max user virtual address (#152428) This warns the user of incompatible configurations, such as 39-bit and 42-bit VMAs for AArch64 non-Android Linux ASan (https://github.com/llvm/llvm-project/issues/145259). | 11 个月前 | |
[compiler-rt][sanitizer] Have all OOM-related error messages start with the same format This way downstream tools that read sanitizer output can differentiate between OOM errors reported by sanitizers from other sanitizer errors. Changes: - Introduce ErrorIsOOM for checking if a platform-specific error code from an "mmap" is an OOM err. - Add ReportOOMError which just prepends this error message to the start of a Report call. - Replace some Reports for OOMs with calls to ReportOOMError. - Update necessary tests. Differential Revision: https://reviews.llvm.org/D127161 | 4 年前 | |
[MemProf] Memory profiling runtime support See RFC for background: http://lists.llvm.org/pipermail/llvm-dev/2020-June/142744.html Follow on companion to the clang/llvm instrumentation support in D85948 and committed earlier. This patch adds the compiler-rt runtime support for the memory profiling. Note that much of this support was cloned from asan (and then greatly simplified and renamed). For example the interactions with the sanitizer_common allocators, error handling, interception, etc. The bulk of the memory profiling specific code can be found in the MemInfoBlock, MemInfoBlockCache, and related classes defined and used in memprof_allocator.cpp. For now, the memory profile is dumped to text (stderr by default, but honors the sanitizer_common log_path flag). It is dumped in either a default verbose format, or an optional terse format. This patch also adds a set of tests for the core functionality. Differential Revision: https://reviews.llvm.org/D87120 | 5 年前 | |
[NFC][sanitizer] Pass user region into OnMapSecondary | 3 年前 | |
[sanitizer] Fix format string | 4 年前 | |
[sanitizer] Use atomic_fetch_add instead of load/store | 3 年前 | |
[test][sanitizer] Add ArrayRef tests Tests are subset of llvm/unittests/ADT/ArrayRefTest.cpp. Added more members to match tests and make class more useful. Reviewed By: hctim Differential Revision: https://reviews.llvm.org/D152760 | 3 年前 | |
[compiler-rt] Fix interceptors with AArch64 BTI (#84061) On AArch64 with BTI, we have to start functions with the appropriate BTI hint to indicate that the function is a valid call target. To support interceptors with AArch64 BTI, add "BTI c". | 2 年前 | |
[sanitizer] Replace ALIGNED with alignas C++11 alignas is already used extensively. alignas must precede static, so adjust the ordering accordingly. msan.cpp: Clang 15 doesn't allow __attribute__((visibility("default"))) alignas(16). Use the order alignas(16) SANITIZER_INTERFACE_ATTRIBUTE. Tested with Clang 7. Pull Request: https://github.com/llvm/llvm-project/pull/98958 | 2 年前 | |
[sanitizer_common][AIX] Use scoped pragma to suppress atomic alignment warnings (#139272) Have the warning suppression apply only to the code that is currently affected. The suppression is guarded via preprocessor conditions to cases where it is tested and known to be needed. Issue: https://github.com/llvm/llvm-project/issues/138916 Co-authored-by: Hubert Tong <hubert.reinterpretcast@gmail.com> | 1 年前 | |
[compiler-rt] Use __atomic builtins whenever possible The code in this file dates back to 2012 when Clang's support for atomic builtins was still quite limited. The bugs referenced in the comment at the top of the file have long been fixed and using the compiler builtins directly should now generate slightly better code. Additionally, this allows using the atomic builtin header for platforms where the __sync_builtins are lacking (e.g. Arm Morello). This change does not introduce any code generation changes for __tsan_read*/__tsan_write* or __tsan_func_{entry,exit} on x86, which indicates the previously noted compiler issues have been fixed. We also have to touch the non-clang codepaths here since the only way we can make this work easily is by making the memory_order enum match the compiler-provided macros, so we have to update the debug checks that assumed the enum was always a bitflag. The one downside of this change is that 32-bit MIPS now definitely requires libatomic (but that may already have been needed for RMW ops). Reviewed By: dvyukov Pull Request: https://github.com/llvm/llvm-project/pull/84439 | 2 年前 | |
[sanitizer] Make CHECKs in bitvector more precise (NFC) (#94630) These CHECKs are all checking indices, which must be strictly smaller than the size (otherwise they would go out of bounds). | 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 年前 | |
| 2 年前 | ||
| 2 年前 | ||
[ASan] [HWASan] Add __sanitizer_ignore_free_hook() (#96749) This change adds a new weak API function which makes the sanitizer ignore the call to free(), and implements the functionality in ASan and HWAsan. The runtime that implements this hook can then call free() at a later point again on the same pointer (and making sure the hook returns zero so that the memory will actually be freed) when it's actually ready for the memory to be cleaned up. This is needed in order to implement an sanitizer-compatible version of Chrome's BackupRefPtr algorithm, since process-wide double-shimming of malloc/free does not work on some platforms. Requested and designed by @c01db33f (Mark) from Project Zero. --------- Co-authored-by: Mark Brand <markbrand@google.com> | 2 年前 | |
[sanitizer_common] Add darwin-specific MemoryRangeIsAvailable (#167797) The fixes a TOCTOU bug in the code that initializes shadow memory in ASAN: https://github.com/llvm/llvm-project/blob/4b05581bae0e3432cfa514788418fb2fc2144904/compiler-rt/lib/asan/asan_shadow_setup.cpp#L66-L91 1. During initialization, we call FindDynamicShadowStart to search the memory mapping for enough space to dynamically allocate shadow memory. 2. We call MemoryRangeIsAvailable(shadow_start, kHighShadowEnd);, which goes into MemoryMappingLayout. 3. We actually map the shadow with ReserveShadowMemoryRange. In step 2, MemoryMappingLayout makes various allocations using the internal allocator. This can cause the allocator to map more memory! In some cases, this can actually allocate memory that overlaps with the shadow region returned by FindDynamicShadowStart in step 1. This is not actually fatal, but it memory corruption; MAP_FIXED is allowed to overlap other regions, and the effect is any overlapping memory is zeroed. ------ To address this, this PR implements MemoryRangeIsAvailable on Darwin without any heap allocations: - Move IntervalsAreSeparate into sanitizer_common.h - Guard existing sanitizer_posix implementation of MemoryRangeIsAvailable behind !SANITIZER_APPLE - IsAddressInMappedRegion in sanitizer_mac becomes MemoryRangeIsAvailable, which also checks for overlap with the DYLD shared cache. After this fix, it should be possible to re-land #166005, which triggered this issue on the x86 iOS simulators. rdar://164208439 | 8 个月前 | |
[sanitizer] Handle nullptr name in prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME) (#160824) ### Summary This PR resolves https://github.com/llvm/llvm-project/issues/160562 | 9 个月前 | |
[sanitizer] Support "bB" printf GLIBC extension (#128449) https://www.gnu.org/software/libc/manual/html_node/Table-of-Output-Conversions.html Without the patch llc triggers non-fatal Asan warning. | 1 年前 | |
[sanitizer] Remove usage of termios ioctl constants on Linux glibc since 2.41 (#149140) glibc 2.42 made all usage of termios ioctl constants strictly internal Therefore, we remove all usage for those removed constants. This should only apply for Linux. Fix #149103 Reference: https://github.com/bminor/glibc/commit/3d3572f59059e2b19b8541ea648a6172136ec42e @fweimer-rh @tstellar | 1 年前 | |
Revert "[compiler-rt][sanitizer-common] adding C23 memset_explicit interception." (#157317) Reverts llvm/llvm-project#154428 due to buildbot breakages (e.g., https://lab.llvm.org/buildbot/#/builders/51/builds/22984) | 10 个月前 | |
[compiler-rt] change internal internal libc invariants llvm-libc is expected to be built with sanitizers and not use interceptors in the long run. For now though, we have a hybrid process, where functions implemented in llvm-libc are instrumented, and glibc fills and sanitizer interceptors fill in the rest. Current sanitizers have an invariant that the REAL(...) function called from inside of an interceptor is uninstrumented. A lot of interceptors call strlen() in order to figure out the size of the region to check/poison. Switch these callsites over to the internal, unsanitized implementation. Reviewed By: hctim, vitalybuka Differential Revision: https://reviews.llvm.org/D108316 | 4 年前 | |
[compiler-rt] Add CMake option to enable execute-only code generation on AArch64 (#140555) For a full toolchain supporting execute-only code generation the runtime libraries also need to be pre-compiled with it enabled. The generic RUNTIMES_EXECUTE_ONLY_CODE CMake option can now be used during build configuration to enable execute-only code generation in compiler-rt. The build option can only be enabled for a runtimes build of compiler-rt, because a recent version of Clang is needed to correctly compile assembly files with execute-only code support. Related RFC: https://discourse.llvm.org/t/rfc-execute-only-code-support-for-runtime-libraries-on-aarch64/86180 | 8 个月前 | |
[compiler-rt] Introduce asm macros for interceptor trampolines This introduces macros for asm sources to define trampolines, and aliases to trampolines. Because we currently do not yet have any real trampolines, this change is a NFC. Reviewed By: dvyukov, vitalybuka Differential Revision: https://reviews.llvm.org/D151317 | 3 年前 | |
[NFCI][asm][i386/x86-64] Enable AT&T syntax explicitly (#164453) Implementation files using the Intel syntax explicitly specify it. Do the same for the few files using AT&T syntax. This also enables building LLVM with -mllvm -x86-asm-syntax=intel in one's Clang config files (i.e. a global preference for Intel syntax). No functional change intended. | 9 个月前 | |
[compiler-rt] Introduce asm macros for interceptor trampolines This introduces macros for asm sources to define trampolines, and aliases to trampolines. Because we currently do not yet have any real trampolines, this change is a NFC. Reviewed By: dvyukov, vitalybuka Differential Revision: https://reviews.llvm.org/D151317 | 3 年前 | |
[compiler-rt] Introduce asm macros for interceptor trampolines This introduces macros for asm sources to define trampolines, and aliases to trampolines. Because we currently do not yet have any real trampolines, this change is a NFC. Reviewed By: dvyukov, vitalybuka Differential Revision: https://reviews.llvm.org/D151317 | 3 年前 | |
[NFCI][asm][i386/x86-64] Enable AT&T syntax explicitly (#164453) Implementation files using the Intel syntax explicitly specify it. Do the same for the few files using AT&T syntax. This also enables building LLVM with -mllvm -x86-asm-syntax=intel in one's Clang config files (i.e. a global preference for Intel syntax). No functional change intended. | 9 个月前 | |
Revert "[compiler-rt] Add weak defs for .*contiguous_container.* functions (#120376)" This reverts commit a73ca291547cf4f5822a3029dd56315354557517. | 1 年前 | |
[sanitizer] Implement __sanitizer_symbolize_frame (#67491) __sanitizer_symbolize_frame is used by HWASAN for use after scope reports. | 2 年前 | |
[sanitizer] Add MemCpyAccessible (#112794) A layer over TryMemCpy to copy only available pages. | 1 年前 | |
[NFC][sanitizer] Move InitTlsSize into InitializePlatformEarly (#108921) | 1 年前 | |
[compiler-rt] openat2 syscall interception. (#153846) | 10 个月前 | |
[NFC, sanitizer_symbolizer] Split Fuchsia and Markup. (#72305) This PR separates parts of the symbolizer markup implementation that are Fuchsia OS specific. This is in preparation of enabling symbolizer markup in other OSs. | 2 年前 | |
[SanitizerCoverage] add weak definitions for the load/store callbacks. Add weak definitions for the load/store callbacks. This matches the weak definitions for all other SanitizerCoverage callbacks. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D129801 | 3 年前 | |
[sanitizer_common] Use %p to print addresses (#98578) Pointers print more leading zeroes for better alignment. | 2 年前 | |
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 年前 | |
Remove NOLINTs from compiler-rt llvm-svn: 371687 | 6 年前 | |
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 年前 | |
[TSan] Increase the number of simultaneously locked mutexes that a thread can hold (#116409) I've run into an issue where TSan can't be used on some code without turning off deadlock detection because a thread tries to hold too many mutexes. It would be preferable to be able to use deadlock detection as that is a major benefit of TSan. Its mentioned in https://github.com/google/sanitizers/issues/950 that the 64 mutex limit was an arbitrary number. I've increased it to 128 and all the tests still pass. Considering the increasing number of cores on CPUs and how programs can now use more threads to take advantage of it, I think raising the limit to 128 would be some good future proofing --------- Co-authored-by: Vitaly Buka <vitalybuka@google.com> | 1 年前 | |
sanitizer_common: use 0 for empty stack id We use 0 for empty stack id from stack depot. Deadlock detector 1 is the only place that uses -1 as a special case. Use 0 because there is a number of checks of the form "if (stack id) ...". Reviewed By: melver Differential Revision: https://reviews.llvm.org/D105776 | 4 年前 | |
sanitizer_common: rename Mutex to MutexState We have 3 different mutexes (RWMutex, BlockingMutex __tsan::Mutex), each with own set of downsides. I want to unify them under a name Mutex. But it will conflict with Mutex in the deadlock detector, which is a way too generic name. Rename it to MutexState. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D105773 | 4 年前 | |
[NFC] Fix cpplint warnings | 5 年前 | |
Revert "[compiler-rt][nfc] DenseMap needs placement new (#133329)" This reverts commit 4485e25dd2a57be1ee504b4dd863a1e140f5084c. Buildbot failures, e.g. https://lab.llvm.org/buildbot/#/builders/66/builds/11827 | 1 年前 | |
[NFC][sanitizer] constexpr in sanitizer_dense_map_info | 4 年前 | |
[sanitizer_common] Fix build breakage by guarding #include <dlfcn.h> My change (https://github.com/llvm/llvm-project/commit/0be4c6b9483594494051e8f1f67afc2b516270ca) broke the Windows buildbot (https://lab.llvm.org/buildbot/#/builders/127/builds/57976/steps/4/logs/stdio) This fixes forward by adding a guard | 2 年前 | |
[sanitizer_common] Add experimental flag to tweak dlopen(<main program>) (#71715) This introduces an experimental flag 'test_only_replace_dlopen_main_program'. When enabled, this will replace dlopen(main program,...) with dlopen(NULL,...), which is the correct way to get a handle to the main program. This can be useful when ASan is statically linked, since dladdr((void*)pthread_join) or similar will return the path to the main program. Note that dlopen(main program,...) never ends well: - PIE in recent glibc versions (glibc bugzilla 24323), or non-PIE: return an error - PIE in current GRTE and older glibc: attempt to load the main program again, leading to reinitializing ASan and failing to remap the shadow memory. --------- Co-authored-by: Thurston Dang <thurston@google.com> | 2 年前 | |
[win/asan] Ensure errno gets set correctly for strtol (#109258) This fixes two problems with asan's interception of strtol on Windows: 1. In the dynamic runtime, the strtol interceptor calls out to ntdll's strtol to perform the string conversion. Unfortunately, that function doesn't set errno. This has been a long-standing problem (#34485), but it was not an issue when using the static runtime. After the static runtime was removed recently (#107899), the problem became more urgent. 2. A module linked against the static CRT will have a different instance of errno than the ASan runtime, since that's now always linked against the dynamic CRT. That means even if the ASan runtime sets errno correctly, the calling module will not see it. This patch fixes the first problem by making the strtol interceptor call out to strtoll instead, and do 32-bit range checks on the result. I can't think of any reasonable way to fix the second problem, so we should stop intercepting strtol in the static runtime thunk. I checked the list of functions in the thunk, and strtol and strtoll are the only ones that set errno. (strtoll was already missing, probably by mistake.) | 1 年前 | |
[compiler-rt][sanitizer] add Haiku support (#134772) Co-authored-by: Jérôme Duval <jerome.duval@gmail.com> | 1 年前 | |
[compiler-rt][sanitizer] add Haiku support (#134772) Co-authored-by: Jérôme Duval <jerome.duval@gmail.com> | 1 年前 | |
[Sanitizer] Option to fallback to stderr if unable to open logfile (#158687) Add the santizier option log_fallback_to_stderr which will set the logpath to stderr if there is an error with the provided logpath. We've seen this happen when process A has write permission to the logpath, but process B does not. In this case, we'd like process B to fallback to writing to stderr, rather than being killed. | 10 个月前 | |
[Sanitizer] Option to fallback to stderr if unable to open logfile (#158687) Add the santizier option log_fallback_to_stderr which will set the logpath to stderr if there is an error with the provided logpath. We've seen this happen when process A has write permission to the logpath, but process B does not. In this case, we'd like process B to fallback to writing to stderr, rather than being killed. | 10 个月前 | |
Revert "[sanitizer] Do not mmap FlagParser::flags_" Reverting since this caused Linux/odd_stack_size.cpp to fail on a bunch of builders. This reverts commit 34e2f4f2e28a464b127d878979efbc87bc148db5. | 2 年前 | |
Revert "[sanitizer] Do not mmap FlagParser::flags_" Reverting since this caused Linux/odd_stack_size.cpp to fail on a bunch of builders. This reverts commit 34e2f4f2e28a464b127d878979efbc87bc148db5. | 2 年前 | |
[sanitizer] Consolidate some LowLevelAllocators to one This removes and replaces usage of a few LowLevelAllocators with a single one provided by sanitizer_common. Functionally, there should be no difference between using different allocators vs the same one. This works really well with D158783 which controls the size of each allocator mmap to significantly reduce fragmentation. This doesn't remove them all, mainly the ones used by asan and the flag parser. Differential Revision: https://reviews.llvm.org/D158786 | 2 年前 | |
[NFC] Extract InitializePlatformCommonFlags And move some Android specifi declarations from headers Differential Revision: https://reviews.llvm.org/D90811 | 5 年前 | |
Reapply "[sanitizer] Add cloak_sanitizer_signal_handlers runtime option" (#163308) (#163423) This reverts commit https://github.com/llvm/llvm-project/commit/27d8441f8282c740903529d8a6b73401fc6c17fa i.e., relands 812a225811bd43aff1e5a5cf1117a0531e533504. This reland uses raise(SIGSEGV) instead of trying to segfault via dereferencing *123. The latter caused buildbot failures for cloak_{sigaction,signal}.cpp when assertions are enabled, because e.g., TSan will assert that 123 is not a valid app memory address, preventing the segfault from being triggered. While it is conceivable that a carefully chosen memory address will trigger a segfault, it is cleaner to directly raise the signal. Additionally, this reland marks signal_handler_is_from_sanitizer as [[maybe_unused]]. Original commit message: If set, signal/sigaction will pretend that the sanitizers did not preinstall any signal handlers. If a user successfully installs a signal handler, it will not be cloaked. The flag is currently off by default, which means this patch should not affect the behavior of any sanitizers. This can be useful in an ecosystem where: 1) there exists a library that will install a signal handler iff it does not detect a preinstalled signal handler (a heuristic to prevent overriding user-installed exception handlers etc.) 2) the aforementioned library is linked in to some, but not all, apps 3) user-installed signal handlers are intended to have the highest priority, followed by the library-installed signal handler, and then the sanitizer's signal handler The flag is in sanitizer_common, though it is currently only supported in ASan, LSan, MSan, TSan and UBSan. | 9 个月前 | |
[sanitizers] Optimize locking StackDepotBase for fork (#76280) Locking StackDepotBase fully is very expensive, as 2^20 buckets needs to be locked. Not locking, but only unlocking buckets, needed to be unlocked to avoid deadlocks, increases a chance of data race, when the value with same hash can be inserted into table twice, but one is lost. However this is just a small additional memory usage by forked process. | 2 年前 | |
[compiler-rt][Fuchsia] Change GetMaxUserVirtualAddress to invoke syscall (#153309) LSan was recently refactored to call GetMaxUserVirtualAddress for diagnostic purposes. This leads to failures for some of our downstream tests which only run with lsan. This occurs because GetMaxUserVirtualAddress depends on setting up shadow via a call to __sanitizer_shadow_bounds, but shadow bounds aren't set for standalone lsan because it doesn't use shadow. This updates the function to invoke the same syscall used by __sanitizer_shadow_bounds calls for getting the memory limit. Ideally this function would only be called once since we only need to get the bounds once. More context in https://fxbug.dev/437346226. | 11 个月前 | |
[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 年前 | |
[compiler-rt] Remove support and workarounds for Android 4 and older (#124056) | 1 年前 | |
compiler-rt: move all __GLIBC_PREREQ into own header file Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68177 llvm-svn: 373632 | 6 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
[NFC] Fix various unintentional //namespace formatting | 2 年前 | |
[sanitizer][NetBSD] Remove ioctl TIOCRCVFRAME and TIOCXMTFRAME The two macros were removed by https://mail-index.netbsd.org/source-changes/2022/12/21/msg142441.html Close #61151 | 3 年前 | |
[compiler-rt][ASan] Add function copying annotations (#91702) This PR adds a __sanitizer_copy_contiguous_container_annotations function, which copies annotations from one memory area to another. New area is annotated in the same way as the old region at the beginning (within limitations of ASan). Overlapping case: The function supports overlapping containers, however no assumptions should be made outside of no false positives in new buffer area. (It doesn't modify old container annotations where it's not necessary, false negatives may happen in edge granules of the new container area.) I don't expect this function to be used with overlapping buffers, but it's designed to work with them and not result in incorrect ASan errors (false positives). If buffers have granularity-aligned distance between them (old_beg % granularity == new_beg % granularity), copying algorithm works faster. If the distance is not granularity-aligned, annotations are copied byte after byte. cpp void __sanitizer_copy_contiguous_container_annotations( const void *old_storage_beg_p, const void *old_storage_end_p, const void *new_storage_beg_p, const void *new_storage_end_p) { This function aims to help with short string annotations and similar container annotations. Right now we change trait types of std::basic_string when compiling with ASan and this function purpose is reverting that change as soon as possible. https://github.com/llvm/llvm-project/blob/87f3407856e61a73798af4e41b28bc33b5bf4ce6/libcxx/include/string#L738-L751 The goal is to not change __trivially_relocatable when compiling with ASan. If this function is accepted and upstreamed, the next step is creating a function like __memcpy_with_asan moving memory with ASan. And then using this function instead of __builtin__memcpy while moving trivially relocatable objects. https://github.com/llvm/llvm-project/blob/11a6799740f824282650aa9ec249b55dcf1a8aae/libcxx/include/__memory/uninitialized_algorithms.h#L644-L646 --- I'm thinking if there is a good way to address fact that in a container the new buffer is usually bigger than the previous one. We may add two more arguments to the functions to address it (the beginning and the end of the whole buffer. Another potential change is removing new_storage_end_p as it's redundant, because we require the same size. Potential future work is creating a function __asan_unsafe_memmove, which will be basically memmove, but with turned off instrumentation (therefore it will allow copy data from poisoned area). --------- Co-authored-by: Vitaly Buka <vitalybuka@google.com> | 1 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
[sanitizer] Add Leb128 encoding/decoding Reviewed By: dvyukov, kstoimenov Differential Revision: https://reviews.llvm.org/D114464 | 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 年前 | |
[sanitizer_common] Add internal_wcs[n]cpy functions (#66529) These functions are required for the related wcs[n]cpy functions to be wrapped on Windows, since given our current method of wrapping functions, calling REAL(wcs[n]cpy) is broken. @vitalybuka requested that these changes be split out from llvm/llvm-project#66128. | 2 年前 | |
[sanitizer_common] Add internal_wcs[n]cpy functions (#66529) These functions are required for the related wcs[n]cpy functions to be wrapped on Windows, since given our current method of wrapping functions, calling REAL(wcs[n]cpy) is broken. @vitalybuka requested that these changes be split out from llvm/llvm-project#66128. | 2 年前 | |
[tsan] Allow unloading of ignored libraries (#105660) Allows unloading and reloading of ignored libraries. We don't attempt to reuse or free memory of unloaded library. So TSan will assert if an ignored library is reloaded 128 times. Co-authored-by: Vitaly Buka <vitalybuka@gmail.com> | 1 年前 | |
[tsan] Allow unloading of ignored libraries (#105660) Allows unloading and reloading of ignored libraries. We don't attempt to reuse or free memory of unloaded library. So TSan will assert if an ignored library is reloaded 128 times. Co-authored-by: Vitaly Buka <vitalybuka@gmail.com> | 1 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
[sanitizer_common] Older Haiku needs _GNU_SOURCE (#156291) Co-authored-by: Jérôme Duval <jerome.duval@gmail.com> | 10 个月前 | |
[sanitizer][nfc] Reformat sanitizer_linux sources (#73573) | 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] NFC: Fix trivial typo Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D77457 | 4 年前 | |
[sanitizer] Add Lempel–Ziv–Welch encoder/decoder It's very simple, fast and efficient for the stack depot compression if used on entire pointers. Reviewed By: morehouse, kstoimenov Differential Revision: https://reviews.llvm.org/D114918 | 4 年前 | |
[sanitizer_common] Add darwin-specific MemoryRangeIsAvailable (#167797) The fixes a TOCTOU bug in the code that initializes shadow memory in ASAN: https://github.com/llvm/llvm-project/blob/4b05581bae0e3432cfa514788418fb2fc2144904/compiler-rt/lib/asan/asan_shadow_setup.cpp#L66-L91 1. During initialization, we call FindDynamicShadowStart to search the memory mapping for enough space to dynamically allocate shadow memory. 2. We call MemoryRangeIsAvailable(shadow_start, kHighShadowEnd);, which goes into MemoryMappingLayout. 3. We actually map the shadow with ReserveShadowMemoryRange. In step 2, MemoryMappingLayout makes various allocations using the internal allocator. This can cause the allocator to map more memory! In some cases, this can actually allocate memory that overlaps with the shadow region returned by FindDynamicShadowStart in step 1. This is not actually fatal, but it memory corruption; MAP_FIXED is allowed to overlap other regions, and the effect is any overlapping memory is zeroed. ------ To address this, this PR implements MemoryRangeIsAvailable on Darwin without any heap allocations: - Move IntervalsAreSeparate into sanitizer_common.h - Guard existing sanitizer_posix implementation of MemoryRangeIsAvailable behind !SANITIZER_APPLE - IsAddressInMappedRegion in sanitizer_mac becomes MemoryRangeIsAvailable, which also checks for overlap with the DYLD shared cache. After this fix, it should be possible to re-land #166005, which triggered this issue on the x86 iOS simulators. rdar://164208439 | 8 个月前 | |
[sanitizer_common] Add darwin-specific MemoryRangeIsAvailable (#167797) The fixes a TOCTOU bug in the code that initializes shadow memory in ASAN: https://github.com/llvm/llvm-project/blob/4b05581bae0e3432cfa514788418fb2fc2144904/compiler-rt/lib/asan/asan_shadow_setup.cpp#L66-L91 1. During initialization, we call FindDynamicShadowStart to search the memory mapping for enough space to dynamically allocate shadow memory. 2. We call MemoryRangeIsAvailable(shadow_start, kHighShadowEnd);, which goes into MemoryMappingLayout. 3. We actually map the shadow with ReserveShadowMemoryRange. In step 2, MemoryMappingLayout makes various allocations using the internal allocator. This can cause the allocator to map more memory! In some cases, this can actually allocate memory that overlaps with the shadow region returned by FindDynamicShadowStart in step 1. This is not actually fatal, but it memory corruption; MAP_FIXED is allowed to overlap other regions, and the effect is any overlapping memory is zeroed. ------ To address this, this PR implements MemoryRangeIsAvailable on Darwin without any heap allocations: - Move IntervalsAreSeparate into sanitizer_common.h - Guard existing sanitizer_posix implementation of MemoryRangeIsAvailable behind !SANITIZER_APPLE - IsAddressInMappedRegion in sanitizer_mac becomes MemoryRangeIsAvailable, which also checks for overlap with the DYLD shared cache. After this fix, it should be possible to re-land #166005, which triggered this issue on the x86 iOS simulators. rdar://164208439 | 8 个月前 | |
[Sanitizers][Darwin] Replace SANITIZER_MAC with SANITIZER_APPLE in source files This is a follow up to [Sanitizers][Darwin] Rename Apple macro SANITIZER_MAC -> SANITIZER_APPLE (D125816) Performed a global search/replace as in title against LLVM sources Differential Revision: https://reviews.llvm.org/D126263 | 4 年前 | |
[msan] Intercept mallinfo2 (#73729) | 2 年前 | |
lsan: Support free_sized and free_aligned_sized from C23 (#144604) Adds support to LSan for free_sized and free_aligned_sized from C23. Other sanitizers will be handled with their own separate PRs. For https://github.com/llvm/llvm-project/issues/144435 This is attempt number 2. Signed-off-by: Justin King <jcking@google.com> | 1 年前 | |
[tsan] Fix running check-ubsan with COMPILER_RT_DEBUG=ON TestCases/Misc/Linux/sigaction.cpp fails because dlsym() may call malloc on failure. And then the wrapped malloc appears to access thread local storage using global dynamic accesses, thus calling ___interceptor___tls_get_addr, before REAL(__tls_get_addr) has been set, so we get a crash inside ___interceptor___tls_get_addr. For example, this can happen when looking up __isoc23_scanf which might not exist in some libcs. Fix this by marking the thread local variable accessed inside the debug checks as "initial-exec", which does not require __tls_get_addr. This is probably a better alternative to https://github.com/llvm/llvm-project/pull/83886. This fixes a different crash but is related to https://github.com/llvm/llvm-project/issues/46204. Backtrace: #0 0x0000000000000000 in ?? () #1 0x00007ffff6a9d89e in ___interceptor___tls_get_addr (arg=0x7ffff6b27be8) at /path/to/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:2759 #2 0x00007ffff6a46bc6 in __sanitizer::CheckedMutex::LockImpl (this=0x7ffff6b27be8, pc=140737331846066) at /path/to/llvm/compiler-rt/lib/sanitizer_common/sanitizer_mutex.cpp:218 #3 0x00007ffff6a448b2 in __sanitizer::CheckedMutex::Lock (this=0x7ffff6b27be8, this@entry=0x730000000580) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_mutex.h:129 #4 __sanitizer::Mutex::Lock (this=0x7ffff6b27be8, this@entry=0x730000000580) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_mutex.h:167 #5 0x00007ffff6abdbb2 in __sanitizer::GenericScopedLock<__sanitizer::Mutex>::GenericScopedLock (mu=0x730000000580, this=<optimized out>) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_mutex.h:383 #6 __sanitizer::SizeClassAllocator64<__tsan::AP64>::GetFromAllocator (this=0x7ffff7487dc0 <__tsan::allocator_placeholder>, stat=stat@entry=0x7ffff570db68, class_id=11, chunks=chunks@entry=0x7ffff5702cc8, n_chunks=n_chunks@entry=128) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_allocator_primary64.h:207 #7 0x00007ffff6abdaa0 in __sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__tsan::AP64> >::Refill (this=<optimized out>, c=c@entry=0x7ffff5702cb8, allocator=<optimized out>, class_id=<optimized out>) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_allocator_local_cache.h:103 #8 0x00007ffff6abd731 in __sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__tsan::AP64> >::Allocate (this=0x7ffff6b27be8, allocator=0x7ffff5702cc8, class_id=140737311157448) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_allocator_local_cache.h:39 #9 0x00007ffff6abc397 in __sanitizer::CombinedAllocator<__sanitizer::SizeClassAllocator64<__tsan::AP64>, __sanitizer::LargeMmapAllocatorPtrArrayDynamic>::Allocate (this=0x7ffff5702cc8, cache=0x7ffff6b27be8, size=<optimized out>, size@entry=175, alignment=alignment@entry=16) at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_allocator_combined.h:69 #10 0x00007ffff6abaa6a in __tsan::user_alloc_internal (thr=0x7ffff7ebd980, pc=140737331499943, sz=sz@entry=175, align=align@entry=16, signal=true) at /path/to/llvm/compiler-rt/lib/tsan/rtl/tsan_mman.cpp:198 #11 0x00007ffff6abb0d1 in __tsan::user_alloc (thr=0x7ffff6b27be8, pc=140737331846066, sz=11, sz@entry=175) at /path/to/llvm/compiler-rt/lib/tsan/rtl/tsan_mman.cpp:223 #12 0x00007ffff6a693b5 in ___interceptor_malloc (size=175) at /path/to/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:666 #13 0x00007ffff7fce7f2 in malloc (size=175) at ../include/rtld-malloc.h:56 #14 __GI__dl_exception_create_format (exception=exception@entry=0x7fffffffd0d0, objname=0x7ffff7fc3550 "/path/to/llvm/compiler-rt/cmake-build-all-sanitizers/lib/linux/libclang_rt.tsan-x86_64.so", fmt=fmt@entry=0x7ffff7ff2db9 "undefined symbol: %s%s%s") at ./elf/dl-exception.c:157 #15 0x00007ffff7fd50e8 in _dl_lookup_symbol_x (undef_name=0x7ffff6af868b "__isoc23_scanf", undef_map=<optimized out>, ref=0x7fffffffd148, symbol_scope=<optimized out>, version=<optimized out>, type_class=0, flags=2, skip_map=0x7ffff7fc35e0) at ./elf/dl-lookup.c:793 --Type <RET> for more, q to quit, c to continue without paging-- #16 0x00007ffff656d6ed in do_sym (handle=<optimized out>, name=0x7ffff6af868b "__isoc23_scanf", who=0x7ffff6a3bb84 <__interception::InterceptFunction(char const*, unsigned long*, unsigned long, unsigned long)+36>, vers=vers@entry=0x0, flags=flags@entry=2) at ./elf/dl-sym.c:146 #17 0x00007ffff656d9dd in _dl_sym (handle=<optimized out>, name=<optimized out>, who=<optimized out>) at ./elf/dl-sym.c:195 #18 0x00007ffff64a2854 in dlsym_doit (a=a@entry=0x7fffffffd3b0) at ./dlfcn/dlsym.c:40 #19 0x00007ffff7fcc489 in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffd310, operate=0x7ffff64a2840 <dlsym_doit>, args=0x7fffffffd3b0) at ./elf/dl-catch.c:237 #20 0x00007ffff7fcc5af in _dl_catch_error (objname=0x7fffffffd368, errstring=0x7fffffffd370, mallocedp=0x7fffffffd367, operate=<optimized out>, args=<optimized out>) at ./elf/dl-catch.c:256 #21 0x00007ffff64a2257 in _dlerror_run (operate=operate@entry=0x7ffff64a2840 <dlsym_doit>, args=args@entry=0x7fffffffd3b0) at ./dlfcn/dlerror.c:138 #22 0x00007ffff64a28e5 in dlsym_implementation (dl_caller=<optimized out>, name=<optimized out>, handle=<optimized out>) at ./dlfcn/dlsym.c:54 #23 ___dlsym (handle=<optimized out>, name=<optimized out>) at ./dlfcn/dlsym.c:68 #24 0x00007ffff6a3bb84 in __interception::GetFuncAddr (name=0x7ffff6af868b "__isoc23_scanf", trampoline=140737311157448) at /path/to/llvm/compiler-rt/lib/interception/interception_linux.cpp:42 #25 __interception::InterceptFunction (name=0x7ffff6af868b "__isoc23_scanf", ptr_to_real=0x7ffff74850e8 <__interception::real___isoc23_scanf>, func=11, trampoline=140737311157448) at /path/to/llvm/compiler-rt/lib/interception/interception_linux.cpp:61 #26 0x00007ffff6a9f2d9 in InitializeCommonInterceptors () at /path/to/llvm/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors.inc:10315 Reviewed By: vitalybuka, MaskRay Pull Request: https://github.com/llvm/llvm-project/pull/83890 | 2 年前 | |
[Sanitizers][Darwin] Replace SANITIZER_MAC with SANITIZER_APPLE in source files This is a follow up to [Sanitizers][Darwin] Rename Apple macro SANITIZER_MAC -> SANITIZER_APPLE (D125816) Performed a global search/replace as in title against LLVM sources Differential Revision: https://reviews.llvm.org/D126263 | 4 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
[compiler-rt] Simplify and rename of operator_new_size_type We can rely on the compiler-provided macro __SIZE_TYPE__ for all non-MSVC compilers and fall back to uptr otherwise. I verified via https://godbolt.org/z/MW9KMjv5f that this works for MSVC as well as GCC 4.5 Clang 3.0, so that should cover supported compilers. While touching this also rename operator_new_size_type to usize which makes it more obvious that this is the equivalent to size_t within the sanitizers runtime (which I plan to use in follow-up changes). Reviewed By: vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/83912 | 2 年前 | |
[compiler-rt] [Darwin] Strip MTE tags from ASAN and TSAN (#166453) ASAN and TSAN need to strip tags in order to compute the correct shadow addresses. rdar://163518624 | 8 个月前 | |
| 9 个月前 | ||
[compiler-rt] Remove leftovers of FreeBSD md5/sha2 interceptors (#153351) This code was added in 18a7ebda99044473fdbce6376993714ff54e6690, but was not properly reverted in d0b9c2c5647656738cda3fb670aa5d3b3a69d784. Removing this code makes it possible to cross-compile TSan for FreeBSD with zig cc which does not provide libcrypt when cross-compiling. I also removed a term.h include (ncurses) which appeared to be unnecessary and likewise prevented cross-compilation with zig cc from working. | 11 个月前 | |
[compiler-rt] Remove leftovers of FreeBSD md5/sha2 interceptors (#153351) This code was added in 18a7ebda99044473fdbce6376993714ff54e6690, but was not properly reverted in d0b9c2c5647656738cda3fb670aa5d3b3a69d784. Removing this code makes it possible to cross-compile TSan for FreeBSD with zig cc which does not provide libcrypt when cross-compiling. I also removed a term.h include (ncurses) which appeared to be unnecessary and likewise prevented cross-compilation with zig cc from working. | 11 个月前 | |
[sanitizer] Port sanitizer_common to LoongArch Initial libsanitizer support for LoongArch. It survived all GCC UBSan tests. Major changes: 1. LoongArch port of Linux kernel only supports statx for stat and its families. So we need to add statx_to_stat and use it for stat-like libcalls. The logic is "borrowed" from Glibc. 2. sanitizer_syscall_linux_loongarch64.inc is mostly duplicated from RISC-V port, as the syscall interface is almost same. Reviewed By: SixWeining, MaskRay, XiaodongLoong, vitalybuka Differential Revision: https://reviews.llvm.org/D129371 | 3 年前 | |
[compiler-rt] Avoid depending on the libnvmm header for NetBSD (#153534) Use the system headers instead since we don't actually need anything from libnvmm; we only care about ioctls and related structures. This makes it possible to cross-compile TSan for NetBSD with zig cc which does not provide libnvmm when cross-compiling. I also removed a term.h include (ncurses) which appeared to be unnecessary and likewise prevented cross-compilation with zig cc from working. | 11 个月前 | |
| 1 年前 | ||
Remove reference to obsolete termio ioctls The termio ioctls are no longer used after commit 59978b21ad9c ("[sanitizer_common] Remove interceptors for deprecated struct termio (#137403)"), remove them. Fixes this build error: ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:765:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ 765 | unsigned IOCTL_TCGETA = TCGETA; | ^~~~~~ ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:769:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ 769 | unsigned IOCTL_TCSETA = TCSETA; | ^~~~~~ ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:770:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ 770 | unsigned IOCTL_TCSETAF = TCSETAF; | ^~~~~~~ ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:771:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ 771 | unsigned IOCTL_TCSETAW = TCSETAW; | ^~~~~~~ Part-of: https://github.com/llvm/llvm-project/pull/138822 Closes: https://github.com/llvm/llvm-project/pull/138822 | 1 年前 | |
Remove reference to obsolete termio ioctls The termio ioctls are no longer used after commit 59978b21ad9c ("[sanitizer_common] Remove interceptors for deprecated struct termio (#137403)"), remove them. Fixes this build error: ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:765:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ 765 | unsigned IOCTL_TCGETA = TCGETA; | ^~~~~~ ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:769:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ 769 | unsigned IOCTL_TCSETA = TCSETA; | ^~~~~~ ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:770:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ 770 | unsigned IOCTL_TCSETAF = TCSETAF; | ^~~~~~~ ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:771:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ 771 | unsigned IOCTL_TCSETAW = TCSETAW; | ^~~~~~~ Part-of: https://github.com/llvm/llvm-project/pull/138822 Closes: https://github.com/llvm/llvm-project/pull/138822 | 1 年前 | |
| 1 年前 | ||
| 1 年前 | ||
[sanitizer_common] Add darwin-specific MemoryRangeIsAvailable (#167797) The fixes a TOCTOU bug in the code that initializes shadow memory in ASAN: https://github.com/llvm/llvm-project/blob/4b05581bae0e3432cfa514788418fb2fc2144904/compiler-rt/lib/asan/asan_shadow_setup.cpp#L66-L91 1. During initialization, we call FindDynamicShadowStart to search the memory mapping for enough space to dynamically allocate shadow memory. 2. We call MemoryRangeIsAvailable(shadow_start, kHighShadowEnd);, which goes into MemoryMappingLayout. 3. We actually map the shadow with ReserveShadowMemoryRange. In step 2, MemoryMappingLayout makes various allocations using the internal allocator. This can cause the allocator to map more memory! In some cases, this can actually allocate memory that overlaps with the shadow region returned by FindDynamicShadowStart in step 1. This is not actually fatal, but it memory corruption; MAP_FIXED is allowed to overlap other regions, and the effect is any overlapping memory is zeroed. ------ To address this, this PR implements MemoryRangeIsAvailable on Darwin without any heap allocations: - Move IntervalsAreSeparate into sanitizer_common.h - Guard existing sanitizer_posix implementation of MemoryRangeIsAvailable behind !SANITIZER_APPLE - IsAddressInMappedRegion in sanitizer_mac becomes MemoryRangeIsAvailable, which also checks for overlap with the DYLD shared cache. After this fix, it should be possible to re-land #166005, which triggered this issue on the x86 iOS simulators. rdar://164208439 | 8 个月前 | |
compiler-rt: sanitizer_common: use close_range() instead of looping (#114442) _SC_OPEN_MAX is quite high on FreeBSD, which makes this close() loop a quite obvious problem when attempting to do any kind of debugging in a process that uses StartSubprocess. Switch to using close_range(2) instead to close them all in a single syscall and dramatically reduce the runtime and syscall trace noise Linux has an equivalent syscall, but I do not have the capacity to test that it works there, so this is limited to SANITIZER_FREEBSD for the time being. | 1 年前 | |
Reapply "[sanitizer] Add cloak_sanitizer_signal_handlers runtime option" (#163308) (#163423) This reverts commit https://github.com/llvm/llvm-project/commit/27d8441f8282c740903529d8a6b73401fc6c17fa i.e., relands 812a225811bd43aff1e5a5cf1117a0531e533504. This reland uses raise(SIGSEGV) instead of trying to segfault via dereferencing *123. The latter caused buildbot failures for cloak_{sigaction,signal}.cpp when assertions are enabled, because e.g., TSan will assert that 123 is not a valid app memory address, preventing the segfault from being triggered. While it is conceivable that a carefully chosen memory address will trigger a segfault, it is cleaner to directly raise the signal. Additionally, this reland marks signal_handler_is_from_sanitizer as [[maybe_unused]]. Original commit message: If set, signal/sigaction will pretend that the sanitizers did not preinstall any signal handlers. If a user successfully installs a signal handler, it will not be cloaked. The flag is currently off by default, which means this patch should not affect the behavior of any sanitizers. This can be useful in an ecosystem where: 1) there exists a library that will install a signal handler iff it does not detect a preinstalled signal handler (a heuristic to prevent overriding user-installed exception handlers etc.) 2) the aforementioned library is linked in to some, but not all, apps 3) user-installed signal handlers are intended to have the highest priority, followed by the library-installed signal handler, and then the sanitizer's signal handler The flag is in sanitizer_common, though it is currently only supported in ASan, LSan, MSan, TSan and UBSan. | 9 个月前 | |
compiler-rt: Fix variadic macro warnings [-Wc++20-extensions] They began complaining since #84520. | 2 年前 | |
[compiler-rt][sanitizer] add Haiku support (#134772) Co-authored-by: Jérôme Duval <jerome.duval@gmail.com> | 1 年前 | |
[compiler-rt] fix couple of netbsd build warnings. (#99745) | 1 年前 | |
[compiler-rt] reimplements GetMemoryProfile for netbsd. (#84841) The actual solution relies on the premise /proc/self/smaps existence. instead relying on native api like freebsd. fixing fuzzer build too. | 2 年前 | |
[sanitizer_common] Implement MemoryMappingLayout for Fuchsia This is needed to port lsan to Fuchsia. Patch By: mcgrathr Differential Revision: https://reviews.llvm.org/D72886 | 6 年前 | |
[compiler-rt][sanitizer] add Haiku support (#134772) Co-authored-by: Jérôme Duval <jerome.duval@gmail.com> | 1 年前 | |
compiler-rt: Rename .cc file in lib/sanitizer_common 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 (many) references to renamed files found by that. llvm-svn: 367463 | 6 年前 | |
[sanitizer-common] [Darwin] Fix overlapping dyld segment addresses (attempt 2) (#167800) This re-lands #166005, which was reverted due to the issue described in #167797. There are 4 small changes: - Fix LoadedModule leak by calling Clear() on the modules list - Fix internal_strncpy calls that are not null-terminated - Improve test to accept the dylib being loaded from a different path than compiled {{.*}}[[DYLIB]] - strcmp => internal_strncmp This should not be merged until after #167797. rdar://163149325 | 8 个月前 | |
[sanitizer_common] Remove <procfs.h> workaround on Solaris (#142758) sanitizer_procmaps_solaris.cpp currently uses #undef _FILE_OFFSET_BITS to hack around the fact that old versions of Solaris <procfs.h> don't work in a largefile environment: /usr/include/sys/procfs.h:42:2: error: #error "Cannot use procfs in the large file compilation environment" 42 | #error "Cannot use procfs in the large file compilation environment" | ^~~~~ However, this is no longer an issue on either Solaris 11.4 or Illumos. The workaround only existed for the benefit of Solaris 11.3. While that had never been supported by LLVM, the sanitizer runtime libs were imported into GCC's libsanitzer. With the removal of Solaris 11.3 support in GCC 15, this is no longer an issue and the workaround can be removed. Tested on amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11. | 1 年前 | |
[compiler-rt][ubsan][nfc-ish] Fix a type conversion bug (#100665) If the inline asm version of ptrauth_strip is used instead of the builtin, the inline asm implementation currently returns an unsigned long, causing an incompatible pointer conversion issue. The spec for ptrauth_sign is that the result has the same type as the original value, so we add a cast to the result of the inline asm. | 1 年前 | |
[NFC][asan] Add QuarantineCallback::{PreQuarantine,RecyclePassThrough} Reviewed By: thurston Differential Revision: https://reviews.llvm.org/D153496 | 3 年前 | |
[NFC][sanitizer] Rename sanitizer_common_range -> sanitizer_range | 3 年前 | |
[NFC][sanitizer] Rename sanitizer_common_range -> sanitizer_range | 3 年前 | |
[sanitizer_common] Disable sanitizer_redefine_builtins on Apple platforms (#153381) This currently generates many linker warnings of this form, due to defining mem(cpy|move|set) in every object file: ld: warning: '.../build/projects/compiler-rt/lib/interception/CMakeFiles/RTInterception.ios.dir/interception_linux.cpp.o' has malformed LC_DYSYMTAB, expected 6 undefined symbols to start at index 1, found 3 undefined symbols starting at index 1 In order for this to actually replace these symbols on mach-o, they would need a leading underscore, e.g. .set _memcpy, ___sanitizer_internal_memcpy. However doing so does not fix the warnings, and furthermore it ends up replacing REAL(memcpy) calls with __sanitizer_internal_memcpy in places such as __asan::Allocator::Reallocate. There is no way on Apple platforms to recreate the intended behaviour, so let's just disable this on them to reduce warning noise. rdar://123771479 | 11 个月前 | |
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 年前 | |
[NFC] turn comment into static_assert (#71504) | 2 年前 | |
Reapply "[sanitizer] Add cloak_sanitizer_signal_handlers runtime option" (#163308) (#163423) This reverts commit https://github.com/llvm/llvm-project/commit/27d8441f8282c740903529d8a6b73401fc6c17fa i.e., relands 812a225811bd43aff1e5a5cf1117a0531e533504. This reland uses raise(SIGSEGV) instead of trying to segfault via dereferencing *123. The latter caused buildbot failures for cloak_{sigaction,signal}.cpp when assertions are enabled, because e.g., TSan will assert that 123 is not a valid app memory address, preventing the segfault from being triggered. While it is conceivable that a carefully chosen memory address will trigger a segfault, it is cleaner to directly raise the signal. Additionally, this reland marks signal_handler_is_from_sanitizer as [[maybe_unused]]. Original commit message: If set, signal/sigaction will pretend that the sanitizers did not preinstall any signal handlers. If a user successfully installs a signal handler, it will not be cloaked. The flag is currently off by default, which means this patch should not affect the behavior of any sanitizers. This can be useful in an ecosystem where: 1) there exists a library that will install a signal handler iff it does not detect a preinstalled signal handler (a heuristic to prevent overriding user-installed exception handlers etc.) 2) the aforementioned library is linked in to some, but not all, apps 3) user-installed signal handlers are intended to have the highest priority, followed by the library-installed signal handler, and then the sanitizer's signal handler The flag is in sanitizer_common, though it is currently only supported in ASan, LSan, MSan, TSan and UBSan. | 9 个月前 | |
sanitizer_common: replace RWMutex/BlockingMutex with Mutex Mutex supports reader access, OS blocking, spinning, portable and smaller than BlockingMutex. Overall it's supposed to be better than RWMutex/BlockingMutex. Replace RWMutex/BlockingMutex with Mutex. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106936 | 4 年前 | |
[sanitizer_common] Support Solaris < 11.4 in GetStaticTlsBoundary This patch, on top of D120048 <https://reviews.llvm.org/D120048>, supports GetTls on Solaris 11.3 and Illumos that lack dlpi_tls_modid. It's the same method originally used in D91605 <https://reviews.llvm.org/D91605>, but integrated into GetStaticTlsBoundary. Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. Differential Revision: https://reviews.llvm.org/D120059 | 3 年前 | |
[sanitizer] Add graceful handling of exceeding StackStore limit. (#76115) | 2 年前 | |
sanitizer_common: prefix thread-safety macros with SANITIZER_ Currently we use very common names for macros like ACQUIRE/RELEASE, which cause conflicts with system headers. Prefix all macros with SANITIZER_ to avoid conflicts. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D116652 | 4 年前 | |
| 2 年前 | ||
[NFC][sanitizer] Rename Lock{Before,After}Fork suffixes locking StackDepotBase (#76279) This is preparation for performance optimization. We need to highlight that this is very specific lock, and should not be used for other purposes. Add fork_child parameter to distinguish processes after fork. | 2 年前 | |
[sanitizers] Optimize locking StackDepotBase for fork (#76280) Locking StackDepotBase fully is very expensive, as 2^20 buckets needs to be locked. Not locking, but only unlocking buckets, needed to be unlocked to avoid deadlocks, increases a chance of data race, when the value with same hash can be inserted into table twice, but one is lost. However this is just a small additional memory usage by forked process. | 2 年前 | |
Port address sanitizer to LoongArch Depends on D129371. It survived all GCC ASan tests. Changes are trivial and mostly "borrowed" RISC-V logics, except that a different SHADOW_OFFSET is used. Reviewed By: SixWeining, MaskRay, XiaodongLoong Differential Revision: https://reviews.llvm.org/D129418 | 3 年前 | |
[RISCV] Replace RISCV -> RISC-V in comments. NFC To be consistent with RISC-V branding guidelines https://riscv.org/about/risc-v-branding-guidelines/ Think we should be using RISC-V where possible. More patches will follow. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D146449 | 3 年前 | |
[Sanitizer][NFC] Replaces a few InternalScopedString::AppendF with InternalScopedString::Append (#80574) | 2 年前 | |
[compiler-rt] fix couple of netbsd build warnings. (#99745) | 1 年前 | |
[compiler-rt] Avoid pulling in __cxa_pure_virtual When building optimized versions of the runtime libraries the compiler is generally able to elide these references, but when building them for maximum debug info (with -O0), these references remain which causes the test suite to fail for tests that do not pull in the C++ standard library. Reviewed By: vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/84613 | 2 年前 | |
[sanitizer_common] Fix UnwindFast on SPARC (#101634) UBSan-Standalone-sparc :: TestCases/Misc/Linux/diag-stacktrace.cpp FAILs on 32 and 64-bit Linux/sparc64 (and on Solaris/sparcv9, too: the test isn't Linux-specific at all). With UBSAN_OPTIONS=fast_unwind_on_fatal=1, the stack trace shows a duplicate innermost frame: compiler-rt/test/ubsan/TestCases/Misc/Linux/diag-stacktrace.cpp:14:31: runtime error: execution reached the end of a value-returning function without returning a value #0 0x7003a708 in f() compiler-rt/test/ubsan/TestCases/Misc/Linux/diag-stacktrace.cpp:14:35 #1 0x7003a708 in f() compiler-rt/test/ubsan/TestCases/Misc/Linux/diag-stacktrace.cpp:14:35 #2 0x7003a714 in g() compiler-rt/test/ubsan/TestCases/Misc/Linux/diag-stacktrace.cpp:17:38 which isn't seen with fast_unwind_on_fatal=0. This turns out to be another fallout from fixing __builtin_return_address/__builtin_extract_return_addr on SPARC. In sanitizer_stacktrace_sparc.cpp (BufferedStackTrace::UnwindFast) the pc arg is the return address, while pc1 from the stack frame (fr_savpc) is the address of the call insn, leading to a double entry for the innermost frame in trace_buffer[]. This patch fixes this by moving the adjustment before all uses. Tested on sparc64-unknown-linux-gnu and sparcv9-sun-solaris2.11 (with the ubsan/TestCases/Misc/Linux tests enabled). | 1 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
[compiler-rt] Use empty SuspendedThreadsList for Fuchsia d48f2d7 made destructor of SuspendedThreadsList protected, so we need an empty subclass to pass to the callback now. Differential Revision: https://reviews.llvm.org/D90695 | 5 年前 | |
[compiler-rt] Use empty SuspendedThreadsList for Fuchsia d48f2d7 made destructor of SuspendedThreadsList protected, so we need an empty subclass to pass to the callback now. Differential Revision: https://reviews.llvm.org/D90695 | 5 年前 | |
[sanitizer] Downgrade TestPTrace() Reports to VReport (#152350) Requested in https://github.com/llvm/llvm-project/pull/152072#discussion_r2257892739 | 11 个月前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
Avoid partial munmap (#92109) ...which caused issues like > ==42==ERROR: AddressSanitizer failed to deallocate 0x32 (50) bytes at address 0x117e0000 (error code: 28) > ==42==Cannot dump memory map on emscriptenAddressSanitizer: CHECK failed: sanitizer_common.cpp:81 "((0 && "unable to unmmap")) != (0)" (0x0, 0x0) (tid=288045824) > #0 0x14f73b0c in __asan::CheckUnwind()+0x14f73b0c (this.program+0x14f73b0c) > #1 0x14f8a3c2 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long)+0x14f8a3c2 (this.program+0x14f8a3c2) > #2 0x14f7d6e1 in __sanitizer::ReportMunmapFailureAndDie(void*, unsigned long, int, bool)+0x14f7d6e1 (this.program+0x14f7d6e1) > #3 0x14f81fbd in __sanitizer::UnmapOrDie(void*, unsigned long)+0x14f81fbd (this.program+0x14f81fbd) > #4 0x14f875df in __sanitizer::SuppressionContext::ParseFromFile(char const*)+0x14f875df (this.program+0x14f875df) > #5 0x14f74eab in __asan::InitializeSuppressions()+0x14f74eab (this.program+0x14f74eab) > #6 0x14f73a1a in __asan::AsanInitInternal()+0x14f73a1a (this.program+0x14f73a1a) when trying to use an ASan suppressions file under Emscripten: Even though it would be considered OK by SUSv4, the Emscripten runtime states "We don't support partial munmapping" (see <https://github.com/emscripten-core/emscripten/commit/f4115eb2c36bac741685300273cb9fa186d719e1> "Implement MAP_ANONYMOUS on top of malloc in STANDALONE_WASM mode (#16289)"). Co-authored-by: Stephan Bergmann <stephan.bergmann@allotropia.de> | 2 年前 | |
[UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour Summary: Quote from http://eel.is/c++draft/expr.add#4: 4 When an expression J that has integral type is added to or subtracted from an expression P of pointer type, the result has the type of P. (4.1) If P evaluates to a null pointer value and J evaluates to 0, the result is a null pointer value. (4.2) Otherwise, if P points to an array element i of an array object x with n elements ([dcl.array]), the expressions P + J and J + P (where J has the value j) point to the (possibly-hypothetical) array element i+j of x if 0≤i+j≤n and the expression P - J points to the (possibly-hypothetical) array element i−j of x if 0≤i−j≤n. (4.3) Otherwise, the behavior is undefined. Therefore, as per the standard, applying non-zero offset to nullptr (or making non-nullptr a nullptr, by subtracting pointer's integral value from the pointer itself) is undefined behavior. (*if* nullptr is not defined, i.e. e.g. -fno-delete-null-pointer-checks was *not* specified.) To make things more fun, in C (6.5.6p8), applying *any* offset to null pointer is undefined, although Clang front-end pessimizes the code by not lowering that info, so this UB is "harmless". Since rL369789 (D66608 [InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P, null) LLVM middle-end uses those guarantees for transformations. If the source contains such UB's, said code may now be miscompiled. Such miscompilations were already observed: * https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190826/687838.html * https://github.com/google/filament/pull/1566 Surprisingly, UBSan does not catch those issues ... until now. This diff teaches UBSan about these UB's. getelementpointer inbounds is a pretty frequent instruction, so this does have a measurable impact on performance; I've addressed most of the obvious missing folds (and thus decreased the performance impact by ~5%), and then re-performed some performance measurements using my [[ https://github.com/darktable-org/rawspeed | RawSpeed ]] benchmark: (all measurements done with LLVM ToT, the sanitizer never fired.) * no sanitization vs. existing check: average +21.62% slowdown * existing check vs. check after this patch: average 22.04% slowdown * no sanitization vs. this patch: average 48.42% slowdown Reviewers: vsk, filcab, rsmith, aaron.ballman, vitalybuka, rjmccall, #sanitizers Reviewed By: rsmith Subscribers: kristof.beyls, nickdesaulniers, nikic, ychen, dtzWill, xbolva00, dberris, arphaman, rupprecht, reames, regehr, llvm-commits, cfe-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D67122 llvm-svn: 374293 | 6 年前 | |
[sanitizer] Backup errno calling symbolizer ScopedThread::Impl::HandleEvent checks that errno is unchanged. As is it's reproducible only with internal symbolizer, but I see no disadvantages in doing that for all symbolizers. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D157945 | 2 年前 | |
Revert "[ASan] Ensure Symbolize Flag setting on Windows through __asan_default_options() is maintained throughout runtime (#132811)" This reverts commit 7bf43fec3aa1c7bb64749efefe0f5fd1e377c1fd. Multiple buildbot failures have been reported: https://github.com/llvm/llvm-project/pull/132811 | 11 个月前 | |
[sanitizer] Implement __sanitizer_symbolize_frame (#67491) __sanitizer_symbolize_frame is used by HWASAN for use after scope reports. | 2 年前 | |
[NFC][sanitizer] Return nullptr instead of 0 | 2 年前 | |
[sanitizer] Cleanup -Wnon-virtual-dtor warnings | 5 年前 | |
Revert "[ASan] Ensure Symbolize Flag setting on Windows through __asan_default_options() is maintained throughout runtime (#132811)" This reverts commit 7bf43fec3aa1c7bb64749efefe0f5fd1e377c1fd. Multiple buildbot failures have been reported: https://github.com/llvm/llvm-project/pull/132811 | 11 个月前 | |
[TSan] fix crash when symbolize on darwin platforms (#99441) The dli_sname filed in Dl_info may be NULL, which could cause a crash | 1 年前 | |
[Sanitizers][Darwin] Replace SANITIZER_MAC with SANITIZER_APPLE in source files This is a follow up to [Sanitizers][Darwin] Rename Apple macro SANITIZER_MAC -> SANITIZER_APPLE (D125816) Performed a global search/replace as in title against LLVM sources Differential Revision: https://reviews.llvm.org/D126263 | 4 年前 | |
[sanitizer_symbolizer] Cast arguments for format strings in markup (#89815) When compiling the common sanitizer libraries, there are many warnings about format specifiers, similar to: compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:31:32: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat] 31 | buffer->AppendF(kFormatData, DI->start); | ~~~~~~~~~~~ ^~~~~~~~~ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:33:46: note: format string is defined here 33 | constexpr const char *kFormatData = "{{{data:%p}}}"; | ^~ | %lu compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:46:43: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat] 46 | buffer->AppendF(kFormatFrame, frame_no, address); | ~~~~~~~~~~~~ ^~~~~~~ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:36:48: note: format string is defined here 36 | constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; | ^~ | %lu ... This is because uptr is dependent on the platform, and can be either unsigned long long, unsigned long, or unsigned int. To fix the warnings, cast the arguments to the expected type of the format strings. | 2 年前 | |
[sanitizer_symbolizer] RenderContextual elements for symbolizer markup. This is part of a stack of PRs to add support for symbolizer markup in linux. Render contextual symbolizer markup elements. For Fuchsia it is not necessary to emit any context given that Fuchsia's logging infrastructure already handles emitting it when necessary. For more information about contextual symbolizer markup elements: https://llvm.org/docs/SymbolizerMarkupFormat.html#contextual-elements Reviewers: PiJoules, petrhosek, vitalybuka Reviewed By: petrhosek, vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/73194 | 2 年前 | |
[sanitizer_symbolizer] Cast arguments for format strings in markup (#89815) When compiling the common sanitizer libraries, there are many warnings about format specifiers, similar to: compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:31:32: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat] 31 | buffer->AppendF(kFormatData, DI->start); | ~~~~~~~~~~~ ^~~~~~~~~ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:33:46: note: format string is defined here 33 | constexpr const char *kFormatData = "{{{data:%p}}}"; | ^~ | %lu compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:46:43: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat] 46 | buffer->AppendF(kFormatFrame, frame_no, address); | ~~~~~~~~~~~~ ^~~~~~~ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:36:48: note: format string is defined here 36 | constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; | ^~ | %lu ... This is because uptr is dependent on the platform, and can be either unsigned long long, unsigned long, or unsigned int. To fix the warnings, cast the arguments to the expected type of the format strings. | 2 年前 | |
[sanitizer_symbolizer] RenderContextual elements for symbolizer markup. This is part of a stack of PRs to add support for symbolizer markup in linux. Render contextual symbolizer markup elements. For Fuchsia it is not necessary to emit any context given that Fuchsia's logging infrastructure already handles emitting it when necessary. For more information about contextual symbolizer markup elements: https://llvm.org/docs/SymbolizerMarkupFormat.html#contextual-elements Reviewers: PiJoules, petrhosek, vitalybuka Reviewed By: petrhosek, vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/73194 | 2 年前 | |
[sanitizer-common] [Darwin] Provide warnings for common sandbox issues (#165907) We currently do not handle errors in task_set_exc_guard_behavior. If this fails, mmap can unexpectedly crash. We also do not currently provide a clear warning if no external symbolizers are found. rdar://163798535 | 8 个月前 | |
[ASan][test] Fix TestCases/Posix/stack-overflow.cpp on Solaris/sparcv9 (#109101) When ASan testing is enabled on SPARC as per PR #107405, the AddressSanitizer-sparc-sunos :: TestCases/Posix/stack-overflow.cpp test FAILs: compiler-rt/test/asan/TestCases/Posix/stack-overflow.cpp:80:12: error: CHECK: expected string not found in input // CHECK: {{stack-overflow on address 0x.* \(pc 0x.* bp 0x.* sp 0x.* T.*\)}} ^ AddressSanitizer:DEADLYSIGNAL AddressSanitizer:DEADLYSIGNAL ================================================================= ==11358==ERROR: AddressSanitizer: SEGV on unknown address 0xff3fff90 (pc 0x000db0c0 bp 0xfeed59f8 sp 0xfeed5978 T0) ==11358==The signal is caused by a READ memory access. AddressSanitizer:DEADLYSIGNAL AddressSanitizer: nested bug in the same thread, aborting. It turns out that sanitizer_linux.cpp (GetPcSpBp) tries to dereference the stack pointer to get at the saved frame pointer, which cannot work since sp has been invalidated by the stack overflow in the test. The access attempt thus leads to a second SEGV. Solaris walkcontext(3C) doesn't have that problem: in the original OpenSolaris sources ($SRC/lib/libc/port/gen/walkstack.c) they used /proc/self/as to avoid the fault, which is quite heavy-handed. Solaris 11.4 uses a non-faulting load instead (load_no_fault_uint32, which just uses the lduwa insn). This patch follows this lead, returning a NULL bp in the failure case. Unfortunately, this leads to SEGVs in the depth of the unwinder, so this patch avoids printing a stack trace in this case. Tested on sparcv9-sun-solaris2.11 and sparc64-unknown-linux-gnu. | 1 年前 | |
[NFC, sanitizer_symbolizer] Split Fuchsia and Markup. (#72305) This PR separates parts of the symbolizer markup implementation that are Fuchsia OS specific. This is in preparation of enabling symbolizer markup in other OSs. | 2 年前 | |
[compiler-rt] Silence warnings This fixes a few of these warnings, when building with Clang ToT on Windows: [622/7618] Building CXX object projects\compiler-rt\lib\sanitizer_common\CMakeFiles\RTSanitizerCommonSymbolizer.x86_64.dir\sanitizer_symbolizer_win.cpp.obj C:\src\git\llvm-project\compiler-rt\lib\sanitizer_common\sanitizer_symbolizer_win.cpp(74,3): warning: cast from 'FARPROC' (aka 'long long (*)()') to 'decltype(::StackWalk64) *' (aka 'int (*)(unsigned long, void *, void *, _tagSTACKFRAME64 *, void *, int (*)(void *, unsigned long long, void *, unsigned long, unsigned long *), void *(*)(void *, unsigned long long), unsigned long long (*)(void *, unsigned long long), unsigned long long (*)(void *, void *, _tagADDRESS64 *))') converts to incompatible function type [-Wcast-function-type-mismatch] This is similar to https://github.com/llvm/llvm-project/pull/97905 | 1 年前 | |
[compiler-rt] Add the common FreeBSD AArch64 support Reviewed by: vitalybuka Differential Revision: https://reviews.llvm.org/D125756 | 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 年前 | |
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] Add hexagon support to sanitizer-common Adds build support for hexagon linux to sanitizer common. | 4 年前 | |
[compiler-rt] Mark $t* as clobbered for Linux/LoongArch syscalls Linux/LoongArch doesn't preserve temporary registers across syscalls, so we have to explicitly mark them as clobbered to avoid trashing local variables. Reviewed By: xry111, xen0n, tangyouling, SixWeining Differential Revision: https://reviews.llvm.org/D137396 | 3 年前 | |
[NFC] Fix banner | 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 年前 | |
msan: account for AVX state when unpoison ucontext_t ucontext_t can be larger than its static size if it contains AVX state and YMM/ZMM registers. Currently a signal handler that tries to access that state can produce false positives with random origins on stack. Account for the additional ucontext_t state. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D116208 | 4 年前 | |
msan: disble CHECK test on powerpc64 It seems that CHECK terminates the process with 0 status on powerpc64: https://reviews.llvm.org/D112440#3084251 Disable the test for now. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112455 | 4 年前 | |
[sanitizer] Fix asserts in asan and tsan in pthread interceptors. (#75394) Calling one of pthread join/detach interceptor on an already joined/detached thread causes asserts such as: AddressSanitizer: CHECK failed: sanitizer_thread_arg_retval.cpp:56 "((t)) != (0)" (0x0, 0x0) (tid=1236094) #0 0x555555634f8b in __asan::CheckUnwind() compiler-rt/lib/asan/asan_rtl.cpp:69:3 #1 0x55555564e06e in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:24 #2 0x5555556491df in __sanitizer::ThreadArgRetval::BeforeJoin(unsigned long) const compiler-rt/lib/sanitizer_common/sanitizer_thread_arg_retval.cpp:56:3 #3 0x5555556198ed in Join<___interceptor_pthread_tryjoin_np(void*, void**)::<lambda()> > compiler-rt/lib/asan/../sanitizer_common/sanitizer_thread_arg_retval.h:74:26 #4 0x5555556198ed in pthread_tryjoin_np compiler-rt/lib/asan/asan_interceptors.cpp:311:29 The assert are replaced by error codes. | 2 年前 | |
[sanitizer] Fix asserts in asan and tsan in pthread interceptors. (#75394) Calling one of pthread join/detach interceptor on an already joined/detached thread causes asserts such as: AddressSanitizer: CHECK failed: sanitizer_thread_arg_retval.cpp:56 "((t)) != (0)" (0x0, 0x0) (tid=1236094) #0 0x555555634f8b in __asan::CheckUnwind() compiler-rt/lib/asan/asan_rtl.cpp:69:3 #1 0x55555564e06e in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:24 #2 0x5555556491df in __sanitizer::ThreadArgRetval::BeforeJoin(unsigned long) const compiler-rt/lib/sanitizer_common/sanitizer_thread_arg_retval.cpp:56:3 #3 0x5555556198ed in Join<___interceptor_pthread_tryjoin_np(void*, void**)::<lambda()> > compiler-rt/lib/asan/../sanitizer_common/sanitizer_thread_arg_retval.h:74:26 #4 0x5555556198ed in pthread_tryjoin_np compiler-rt/lib/asan/asan_interceptors.cpp:311:29 The assert are replaced by error codes. | 2 年前 | |
| 1 年前 | ||
| 1 年前 | ||
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 1 年前 | |
sanitizer_common: prefix thread-safety macros with SANITIZER_ Currently we use very common names for macros like ACQUIRE/RELEASE, which cause conflicts with system headers. Prefix all macros with SANITIZER_ to avoid conflicts. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D116652 | 4 年前 | |
[NFC][sanitizer] Update DTLS_on_tls_get_addr failure comment (#109546) Also return nullptr on failure. All callers do nothing for nullptr or {tls_beg, 0}, but with nullptr they continue earlier. | 1 年前 | |
[sanitizer] Remove DTLS_on_libc_memalign (#108120) DTLS_on_libc_memalign is called from primary allocator, so __sanitizer_get_allocated_begin should also be aware of allocation, and correctly handled by GetDTLSRange. | 1 年前 | |
compiler-rt: Rename .cc file in lib/sanitizer_common 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 (many) references to renamed files found by that. llvm-svn: 367463 | 6 年前 | |
Revert "Reland "[compiler-rt][test] Heed COMPILER_RT_DEBUG when compiling unittests"" This reverts commit 255c3e3dcb06299aa2365f70817322a8a381c351, which breaks Msan-x86_64-Test. | 3 年前 | |
[NFC, sanitizer_symbolizer] Split Fuchsia and Markup. (#72305) This PR separates parts of the symbolizer markup implementation that are Fuchsia OS specific. This is in preparation of enabling symbolizer markup in other OSs. | 2 年前 | |
[sanitizer_common] Drop remaining support for Android 5 or older (#146187) Dependent on https://github.com/llvm/llvm-project/pull/145227 | 1 年前 | |
[compiler-rt][sanitizer] Add Windows MIPS32 support (#145110) As LLVM supports mipsel-windows-gnu and mipsel-windows-msvc triples, also support this configuration in compiler-rt | 1 年前 | |
[NFC][sanitizer] Minor change: eliminate loop Reviewed By: #sanitizers, fmayer, vitalybuka Differential Revision: https://reviews.llvm.org/D128873 | 4 年前 | |
[sanitizer_common][nfc] Rename tid_t to avoid conflicting declarations (#149011) tid_t is also defined in the AIX header /usr/include/sys/types.h which is included by system pthread.h. The use of tid_t by AIX is conforming according to [POSIX](https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html): > Implementations may add symbols to the headers shown in the following table [ ... ] | 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 年前 | |
[tsan, go] fix Go windows build Summary: Don't use weak exports when building tsan into a shared library for Go. gcc can't handle the pragmas used to make the weak references. Include files that have been added since the last update to build.bat. (We should really find a better way to list all the files needed.) Add windows version defines (WINVER and _WIN32_WINNT) to get AcquireSRWLockExclusive and ReleaseSRWLockExclusive defined. Define GetProcessMemoryInfo to use the kernel32 version. This is kind of a hack, the windows header files should do this translation for us. I think we're not in the right family partition (we're using Desktop, but that translation only happens for App and System partitions???), but hacking the family partition seems equally gross and I have no idea what the consequences of that might be. Patch by Keith Randall. Reviewers: dvyukov, vitalybuka Reviewed By: vitalybuka Subscribers: jfb, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D68599 llvm-svn: 373984 | 6 年前 | |
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 年前 | |
[sanitizers] convert some errant CRLF line endings to LF (#108454) (nfc) https://github.com/llvm/llvm-project/pull/107899 Added some files with CRLF line endings. Mixed line endings are somewhat gross, so I've converted them all to unix. | 1 年前 | |
[sanitizers] convert some errant CRLF line endings to LF (#108454) (nfc) https://github.com/llvm/llvm-project/pull/107899 Added some files with CRLF line endings. Mixed line endings are somewhat gross, so I've converted them all to unix. | 1 年前 | |
[sanitizers] convert some errant CRLF line endings to LF (#108454) (nfc) https://github.com/llvm/llvm-project/pull/107899 Added some files with CRLF line endings. Mixed line endings are somewhat gross, so I've converted them all to unix. | 1 年前 | |
[asan][windows] use __builtin_function_address to avoid problematic codegen in weak function registration (#108327) Previously we were relying on optnone for this, but that didn't seem to be sufficient. | 1 年前 | |
[sanitizer] Allow to override GetDTLSRange (#108348) And rename it into __sanitizer_get_dtls_size. The test will be in a separate patch, as I expected reverts of the test. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 11 个月前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 7 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 4 年前 | ||
| 8 个月前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 11 个月前 | ||
| 11 个月前 | ||
| 3 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 11 个月前 | ||
| 7 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 11 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 |