003 File Manager
Current Path:
/usr/src/contrib/llvm-project/compiler-rt/lib/scudo
usr
/
src
/
contrib
/
llvm-project
/
compiler-rt
/
lib
/
scudo
/
📁
..
📄
scudo_allocator.cpp
(30.02 KB)
📄
scudo_allocator.h
(4.54 KB)
📄
scudo_allocator_combined.h
(2.14 KB)
📄
scudo_allocator_secondary.h
(7.03 KB)
📄
scudo_crc32.cpp
(893 B)
📄
scudo_crc32.h
(4.74 KB)
📄
scudo_errors.cpp
(2.82 KB)
📄
scudo_errors.h
(1.31 KB)
📄
scudo_flags.cpp
(4.25 KB)
📄
scudo_flags.h
(805 B)
📄
scudo_flags.inc
(2.11 KB)
📄
scudo_interface_internal.h
(984 B)
📄
scudo_malloc.cpp
(2.2 KB)
📄
scudo_new_delete.cpp
(4.14 KB)
📄
scudo_platform.h
(3.09 KB)
📄
scudo_termination.cpp
(1.36 KB)
📄
scudo_tsd.h
(1.67 KB)
📄
scudo_tsd_exclusive.cpp
(2.17 KB)
📄
scudo_tsd_exclusive.inc
(1.34 KB)
📄
scudo_tsd_shared.cpp
(3.38 KB)
📄
scudo_tsd_shared.inc
(1.61 KB)
📄
scudo_utils.cpp
(4.89 KB)
📄
scudo_utils.h
(986 B)
📁
standalone
Editing: scudo_errors.cpp
//===-- scudo_errors.cpp ----------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// Verbose termination functions. /// //===----------------------------------------------------------------------===// #include "scudo_utils.h" #include "sanitizer_common/sanitizer_flags.h" namespace __scudo { void NORETURN reportCallocOverflow(uptr Count, uptr Size) { dieWithMessage("calloc parameters overflow: count * size (%zd * %zd) cannot " "be represented with type size_t\n", Count, Size); } void NORETURN reportPvallocOverflow(uptr Size) { dieWithMessage("pvalloc parameters overflow: size 0x%zx rounded up to system " "page size 0x%zx cannot be represented in type size_t\n", Size, GetPageSizeCached()); } void NORETURN reportAllocationAlignmentTooBig(uptr Alignment, uptr MaxAlignment) { dieWithMessage("invalid allocation alignment: %zd exceeds maximum supported " "allocation of %zd\n", Alignment, MaxAlignment); } void NORETURN reportAllocationAlignmentNotPowerOfTwo(uptr Alignment) { dieWithMessage("invalid allocation alignment: %zd, alignment must be a power " "of two\n", Alignment); } void NORETURN reportInvalidPosixMemalignAlignment(uptr Alignment) { dieWithMessage( "invalid alignment requested in posix_memalign: %zd, alignment" " must be a power of two and a multiple of sizeof(void *) == %zd\n", Alignment, sizeof(void *)); } void NORETURN reportInvalidAlignedAllocAlignment(uptr Size, uptr Alignment) { #if SANITIZER_POSIX dieWithMessage("invalid alignment requested in aligned_alloc: %zd, alignment " "must be a power of two and the requested size 0x%zx must be a multiple " "of alignment\n", Alignment, Size); #else dieWithMessage("invalid alignment requested in aligned_alloc: %zd, the " "requested size 0x%zx must be a multiple of alignment\n", Alignment, Size); #endif } void NORETURN reportAllocationSizeTooBig(uptr UserSize, uptr TotalSize, uptr MaxSize) { dieWithMessage("requested allocation size 0x%zx (0x%zx after adjustments) " "exceeds maximum supported size of 0x%zx\n", UserSize, TotalSize, MaxSize); } void NORETURN reportRssLimitExceeded() { dieWithMessage("specified RSS limit exceeded, currently set to " "soft_rss_limit_mb=%zd\n", common_flags()->soft_rss_limit_mb); } void NORETURN reportOutOfMemory(uptr RequestedSize) { dieWithMessage("allocator is out of memory trying to allocate 0x%zx bytes\n", RequestedSize); } } // namespace __scudo
Upload File
Create Folder