Age | Commit message (Collapse) | Author | Files | Lines |
|
After extracting memory groups, it's safe to do
1. markFreeBlocks
2. releaseFreeMemoryToOS concurrently with pushBlocks() and
popBatches(). This will improve the throughput of Scudo.
Reviewed By: cferris
Differential Revision: https://reviews.llvm.org/D153608
|
|
online merging.
In `initializeProfileForContinuousMode`, we have already locked the profile file when merging is enabled, so there's no need to lock the same file second time in `openFileForMerging`.
On Linux/Darwin, the locking the same file twice doesn't cause any problem. But on Windows, it causes the problem to hang forever.
With this minor fix, continuous mode seems working with online merging on Windows.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D154748
|
|
|
|
This fixes the werror from https://lab.llvm.org/buildbot/#/builders/165/builds/38829
Reviewed By: enh
Differential Revision: https://reviews.llvm.org/D154733
|
|
|
|
This CL removes the restriction that pushing blocks into BatchClassId
can only be done when freelist is not empty. Without this constraint,
BatchClassId is also available for gathering blocks into groups.
Reviewed By: cferris
Differential Revision: https://reviews.llvm.org/D153492
|
|
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D154659
|
|
For unknown reasons this casues a bus error.
See:
https://lab.llvm.org/buildbot/#/builders/178/builds/5157
|
|
Zfinx extension also provide floating point environment like F extension, so
enable that on `__fe_getround` and `__fe_raise_inexact` too.
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D154570
|
|
This reverts my commit 015dabd7672f936cdb5bdcad20fe80b17f05c9ca
due to breaking non-glibc builds.
|
|
Attempt 2 at fixing a buildbot error https://lab.llvm.org/buildbot#builders/57/builds/28143
that I had introduced in D154272
|
|
This increases the parallelism and the usage of TSDs
Reviewed By: cferris
Differential Revision: https://reviews.llvm.org/D152988
|
|
When all the blocks (local caches are included) are freed, the size of
free blocks should be equal to `AllocatedUser`.
Reviewed By: cferris
Differential Revision: https://reviews.llvm.org/D152769
|
|
Reland with -Wcast-qual issue fixed
Original commit message:
This patch adds an msan interceptor for dladdr1 (with support for RTLD_DL_LINKMAP and RTLD_DL_SYMENT) and an accompanying test. It also adds a helper file, msan_dl.cpp, that contains UnpoisonDllAddrInfo (refactored out of the dladdr interceptor) and UnpoisonDllAddr1ExtraInfo.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D154272
|
|
Current FreeBSD has increased size of cpuset. Match it to not break the
build on newer FreeBSD.
Patch by John F. Carr
Fixes: https://github.com/llvm/llvm-project/issues/63485
|
|
fdr-thread-order.cpp can be very slow when the thread contention is large.
Enable it for AArch64 and x86-64 for now.
fdr-mode.cpp fails on a ppc64le machine. Unsupport it on ppc64le for now.
The remaining modified tests pass on AArch64, ppc64le, and x86-64.
|
|
|
|
Mark loongarch64 as supported for profile. All tests passed.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D154405
|
|
|
|
context
LSan is unsupported on Darwin anyway, and this test fals on public Darwin bots
Differential Revision: https://reviews.llvm.org/D154389
|
|
This refactor helps us identify which steps need FLLock so that we can
reduce the holding time of FLLock in SizeClassAllocator64.
Also move the data members to the end of class to align the style in
SizeClassAllocator32.
Reviewed By: cferris
Differential Revision: https://reviews.llvm.org/D152596
|
|
Some Fuchsia zx tests failed from https://reviews.llvm.org/D153888:
https://turquoise-internal-review.git.corp.google.com/c/integration/+/729619
Use `ReservedMemoryDefault` for `SCUDO_FUCHSIA` to use the default
MemMap API, while test failures are debugged.
Differential Revision: https://reviews.llvm.org/D154538
|
|
Reviewed By: Caslyn, Chia-hungDuan
Differential Revision: https://reviews.llvm.org/D153888
|
|
In the initially commit, we limited the static archive to osx.
This patch removes that limitation.
Differential Revision: https://reviews.llvm.org/D153789
|
|
Make minor changes to enable DFSAN and its tests on
loongarch64. And port Linux loongarch64 memory mappings
from msan.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D140690
|
|
`lit` doesn't accept arbitrary substrings of the target triple any longer,
so d5a779b5a39b655ed9fafedaacbb017c46f5dbfe
<https://reviews.llvm.org/rGd5a779b5a39b655ed9fafedaacbb017c46f5dbfe> has
no effect.
Instead, this patch uses the `target=` syntax as all other tests in
`compiler-rt`.
Tested on `amd64-pc-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D154298
|
|
Reverting my commit because of buildbot breakage.
This reverts commit d0b0dbeae17756f7ba99e0867cfb867fcb375066.
|
|
This patch adds an msan interceptor for dladdr1 (with support
for RTLD_DL_LINKMAP and RTLD_DL_SYMENT) and an accompanying
test. It also adds a helper file, msan_dl.cpp, that contains
UnpoisonDllAddrInfo (refactored out of the dladdr interceptor)
and UnpoisonDllAddr1ExtraInfo.
Differential Revision: https://reviews.llvm.org/D154272
|
|
Exclude cached blocks with invalid start address. Mainly concerned with
cached blocks that are still available/unused.
Reviewed By: Chia-hungDuan, cferris
Differential Revision: https://reviews.llvm.org/D154148
|
|
Differential Revision: https://reviews.llvm.org/D154041
|
|
This adds a simple lit test for dladdr. (There is currently a dladdr testcase in
compiler-rt/lib/msan/tests/msan_test.cpp, but not a stand-alone lit test.)
This is an incremental step towards adding a test case (and, eventually, an interceptor)
for the more complicated dladdr1 function.
Differential Revision: https://reviews.llvm.org/D154255
|
|
Without rpath information, the test fails on some Darwin platforms since the binary fails to find the shared library.
rdar://110010041
Differential Revision: https://reviews.llvm.org/D154003
|
|
__sanitizer_get_allocated_begin and __sanitizer_get_allocated_size_fast
were introduced recently in D147005 and D151360, but not added here,
leading to linker errors.
Differential Revision: https://reviews.llvm.org/D153680
|
|
This will make it easier to verify in a future patch that the ReservedMemory object has been fully dispatched.
Reviewed By: Chia-hungDuan
Differential Revision: https://reviews.llvm.org/D153019
|
|
In tryLock, the Precedence value is set using the fast time function
now. This should speed up tryLock calls slightly.
This should be okay even though the value is used as a kind of random
value in getTSDAndLockSlow. The fast time call still sets enough bits
to avoid getting the same TSD on every call.
Reviewed By: Chia-hungDuan
Differential Revision: https://reviews.llvm.org/D154039
|
|
This patch adds basic memory sanitizer support for loongarch64
with 47-bit VMA, which memory layout is based on x86_64.
The LLVM part of the LoongArch memory sanitizer implementation will
be done separately, which will fix failing tests in check-msan.
These failing tests fail with the following same error: "error in
backend: unsupported architecture".
Reviewed By: #sanitizers, vitalybuka, MaskRay
Differential Revision: https://reviews.llvm.org/D140528
|
|
When I moved the primary to use the faster get time syscall, I missed
the secondary use. Now fix the secondary to use this function too.
Reviewed By: Chia-hungDuan
Differential Revision: https://reviews.llvm.org/D154012
|
|
Currently, we only return REGISTERS_UNAVAILABLE_FATAL if we receive
KERN_INVALID_ARGUMENT from thread_status. In reality, there are other
possible return values (MACH_SEND_INVALID_DEST for example) that make it
dangerous to read memory. This can be demonstrated by running
create_thread_leak.cpp in standalone mode where it will appear to hang
due to a EXC_BAD_ACCESS while scanning the stack.
This change reverses the current logic to treat MIG_ARRAY_TOO_LARGE as
non-fatal, and all other errors as fatal.
Differential revision: https://reviews.llvm.org/D153072
|
|
!ALLOCATOR64_SMALL_SIZE
This artificial size class map uses a very large kMaxSize (1<<34) which is not
suitable for small kAddressSpaceSize systems (aarch64-*-linux-android, riscv64).
Exposed by D153664.
|
|
Commit 278ccdacdcbde3399f1fa4b3ab929212e4e0322c says that kAllocatorSize
must be >= (1<<32), but this is not accurate. This static_assert causes 128GiB
kAllocatorSize to be unable to select DefaultSizeClassMap (kRegionSize is
1<<31).
Relax the restriction to be able to satisfy the largest size class. This allows
DefaultSizeClassMap to be usable with 128GiB kAllocatorSize, with
check-{asan,lsan,sanitizer} passing.
Reviewed By: #sanitizers, vitalybuka, kstoimenov
Differential Revision: https://reviews.llvm.org/D153664
|
|
The q floating point suffix is not supported by all compilers
configurations (e.g. GCC only supports it for some targets), so use a
macro (much like UINT64_C) instead. As this touches almost all lines in
the two tests also run them through clang-format.
|
|
The test causes unexpectedly high RSS usage there.
|
|
These conversion functions were using LDBL_MANT_DIG (which is the 80-bit
extended float on x86) instead of the appropriate macro for the 128-bit
floating point type expected by the *tf* softfloat library calls.
This was discovered while testing D98261 (which allows building the *tf*
functions on x86).
This also changes the constants used in the two tests to use 128-bit
floating-point literals instead of long double ones to ensure that the
comparison succeeds on platforms with smaller long double (e.g. x86_64)
Reviewed By: scanon
Differential Revision: https://reviews.llvm.org/D131787
|
|
This revision removes sanity checks in
`__sanitizer_annotate_contiguous_container`.
(Changed them to `DCHECK_EQ`.)
Those checks may be problematic, if someone manually unpoisoned memory block.
Manual unpoisoning may be used if part of the program is not
instrumented.
Those checks are helpful while confirming correctness of ASan annotations
implementation.
Originally suggested here: https://reviews.llvm.org/D136765#4174546
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D145482
|
|
Dumped some basic info about what is being cached and about the cache
itself. Output of test below:
...
Stats: MapAllocatorCache: EntriesCount: 33, MaxEntriesCount: 64, MaxEntrySize: 1048576
StartBlockAddress: 0x6d342c1000, EndBlockAddress: 0x6d342d2000, BlockSize: 69632
StartBlockAddress: 0x6fc45ff000, EndBlockAddress: 0x6fc462f000, BlockSize: 196608
...
Reviewed By: Chia-hungDuan
Differential Revision: https://reviews.llvm.org/D153483
|
|
In SmallAlign implemented deallocation for the pointers
Reviewed By: cferris, Chia-hungDuan
Differential Revision: https://reviews.llvm.org/D153480
|
|
`populateFreeListAndPopBatch` may return batch with single block. Merge
it with the reported free blocks and enqueue them together.
Reviewed By: cferris, fabio-d
Differential Revision: https://reviews.llvm.org/D153787
|
|
The system libc may be different from the libc passed in
CMAKE_SYSROOT. Instead of using the ldd in PATH to detect
glibc version, use the features.h header file.
Differential Revision: https://reviews.llvm.org/D151678
|
|
https://man7.org/linux/man-pages/man3/getentropy.3.html
Reviewers: melver
Reviewed-By: melver
Differential Revision: https://reviews.llvm.org/D153723
|
|
We expect log messages from enother thread triggered by actions.
|