Skip to content

Commit

Permalink
[compiler-rt] NFC: Fix trivial typo
Browse files Browse the repository at this point in the history
Reviewed By: xgupta

Differential Revision: https://reviews.llvm.org/D77457
  • Loading branch information
kiszk authored and xgupta committed Sep 4, 2021
1 parent d6ca91e commit a1e7e40
Show file tree
Hide file tree
Showing 69 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion compiler-rt/cmake/Modules/BuiltinTests.cmake
Expand Up @@ -74,7 +74,7 @@ function(try_compile_only output)

# Strip quotes from the compile command, as the compiler is not expecting
# quoted arguments (see discussion on D62063 for when this can come up). If
# the quotes were there for arugments with spaces in them, the quotes were
# the quotes were there for arguments with spaces in them, the quotes were
# not going to help since the string gets split on spaces below.
string(REPLACE "\"" "" test_compile_command "${test_compile_command}")

Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/cmake/config-ix.cmake
Expand Up @@ -462,7 +462,7 @@ if(APPLE)
endforeach()
endif()

# Explictly disable unsupported Sanitizer configurations.
# Explicitly disable unsupported Sanitizer configurations.
list(REMOVE_ITEM FUZZER_SUPPORTED_OS "watchos")
list(REMOVE_ITEM FUZZER_SUPPORTED_OS "watchossim")

Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/include/sanitizer/asan_interface.h
Expand Up @@ -316,7 +316,7 @@ void *__asan_addr_is_in_fake_stack(void *fake_stack, void *addr, void **beg,
void __asan_handle_no_return(void);

/// Update allocation stack trace for the given allocation to the current stack
/// trace. Returns 1 if successfull, 0 if not.
/// trace. Returns 1 if successful, 0 if not.
int __asan_update_allocation_context(void* addr);

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/include/sanitizer/common_interface_defs.h
Expand Up @@ -28,7 +28,7 @@ typedef struct {
// Enable sandbox support in sanitizer coverage.
int coverage_sandboxed;
// File descriptor to write coverage data to. If -1 is passed, a file will
// be pre-opened by __sanitizer_sandobx_on_notify(). This field has no
// be pre-opened by __sanitizer_sandbox_on_notify(). This field has no
// effect if coverage_sandboxed == 0.
intptr_t coverage_fd;
// If non-zero, split the coverage data into well-formed blocks. This is
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/asan/asan_interceptors.cpp
Expand Up @@ -581,7 +581,7 @@ INTERCEPTOR(int, atexit, void (*func)()) {
#if CAN_SANITIZE_LEAKS
__lsan::ScopedInterceptorDisabler disabler;
#endif
// Avoid calling real atexit as it is unrechable on at least on Linux.
// Avoid calling real atexit as it is unreachable on at least on Linux.
int res = REAL(__cxa_atexit)((void (*)(void *a))func, nullptr, nullptr);
REAL(__cxa_atexit)(AtCxaAtexit, nullptr, nullptr);
return res;
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/asan/asan_report.cpp
Expand Up @@ -155,7 +155,7 @@ class ScopedInErrorReport {
DumpProcessMap();

// Copy the message buffer so that we could start logging without holding a
// lock that gets aquired during printing.
// lock that gets acquired during printing.
InternalMmapVector<char> buffer_copy(kErrorMessageBufferSize);
{
Lock l(&error_message_buf_mutex);
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/asan/tests/asan_interface_test.cpp
Expand Up @@ -90,7 +90,7 @@ TEST(AddressSanitizerInterface, GetCurrentAllocatedBytesTest) {
TEST(AddressSanitizerInterface, GetHeapSizeTest) {
// ASan allocator does not keep huge chunks in free list, but unmaps them.
// The chunk should be greater than the quarantine size,
// otherwise it will be stuck in quarantine instead of being unmaped.
// otherwise it will be stuck in quarantine instead of being unmapped.
static const size_t kLargeMallocSize = (1 << 28) + 1; // 256M
free(Ident(malloc(kLargeMallocSize))); // Drain quarantine.
size_t old_heap_size = __sanitizer_get_heap_size();
Expand Down
8 changes: 4 additions & 4 deletions compiler-rt/lib/builtins/README.txt
Expand Up @@ -271,8 +271,8 @@ switchu8

// There is no C interface to the *_vfp_d8_d15_regs functions. There are
// called in the prolog and epilog of Thumb1 functions. When the C++ ABI use
// SJLJ for exceptions, each function with a catch clause or destuctors needs
// to save and restore all registers in it prolog and epliog. But there is
// SJLJ for exceptions, each function with a catch clause or destructors needs
// to save and restore all registers in it prolog and epilog. But there is
// no way to access vector and high float registers from thumb1 code, so the
// compiler must add call outs to these helper functions in the prolog and
// epilog.
Expand Down Expand Up @@ -311,9 +311,9 @@ double __floatsidfvfp(int a); // Appears to convert from
float __floatsisfvfp(int a); // Appears to convert from
// int to float.
double __floatunssidfvfp(unsigned int a); // Appears to convert from
// unisgned int to double.
// unsigned int to double.
float __floatunssisfvfp(unsigned int a); // Appears to convert from
// unisgned int to float.
// unsigned int to float.
int __gedf2vfp(double a, double b); // Appears to return __gedf2
// (a >= b)
int __gesf2vfp(float a, float b); // Appears to return __gesf2
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/lib/builtins/arm/truncdfsf2vfp.S
Expand Up @@ -11,9 +11,9 @@
//
// extern float __truncdfsf2vfp(double a);
//
// Converts double precision float to signle precision result.
// Converts double precision float to single precision result.
// Uses Darwin calling convention where a double precision parameter is
// passed in a R0/R1 pair and a signle precision result is returned in R0.
// passed in a R0/R1 pair and a single precision result is returned in R0.
//
.syntax unified
.p2align 2
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/builtins/emutls.c
Expand Up @@ -150,7 +150,7 @@ static void win_error(DWORD last_err, const char *hint) {
NULL, last_err, 0, (LPSTR)&buffer, 1, NULL)) {
fprintf(stderr, "Windows error: %s\n", buffer);
} else {
fprintf(stderr, "Unkown Windows error: %s\n", hint);
fprintf(stderr, "Unknown Windows error: %s\n", hint);
}
LocalFree(buffer);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/builtins/fixunsxfdi.c
Expand Up @@ -26,7 +26,7 @@
// mmmm mmmm mmmm

#if defined(_MSC_VER) && !defined(__clang__)
// MSVC throws a warning about 'unitialized variable use' here,
// MSVC throws a warning about 'uninitialized variable use' here,
// disable it for builds that warn-as-error
#pragma warning(push)
#pragma warning(disable : 4700)
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/builtins/fixunsxfsi.c
Expand Up @@ -26,7 +26,7 @@
// mmmm mmmm mmmm

#if defined(_MSC_VER) && !defined(__clang__)
// MSVC throws a warning about 'unitialized variable use' here,
// MSVC throws a warning about 'uninitialized variable use' here,
// disable it for builds that warn-as-error
#pragma warning(push)
#pragma warning(disable : 4700)
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/builtins/fixxfdi.c
Expand Up @@ -25,7 +25,7 @@
// mmmm mmmm mmmm

#if defined(_MSC_VER) && !defined(__clang__)
// MSVC throws a warning about 'unitialized variable use' here,
// MSVC throws a warning about 'uninitialized variable use' here,
// disable it for builds that warn-as-error
#pragma warning(push)
#pragma warning(disable : 4700)
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/dfsan/done_abilist.txt
Expand Up @@ -269,7 +269,7 @@ fun:strrchr=custom
fun:strstr=custom

# Functions which take action based on global state, such as running a callback
# set by a sepperate function.
# set by a separate function.
fun:write=custom

# Functions that take a callback (wrap the callback manually).
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/fuzzer/CMakeLists.txt
Expand Up @@ -77,7 +77,7 @@ endif()

if(MSVC)
# Silence warnings by turning off exceptions in MSVC headers and avoid an
# error by unecessarily defining thread_local when it isn't even used on
# error by unnecessarily defining thread_local when it isn't even used on
# Windows.
list(APPEND LIBFUZZER_CFLAGS -D_HAS_EXCEPTIONS=0)
else()
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/fuzzer/FuzzerDataFlowTrace.cpp
Expand Up @@ -37,7 +37,7 @@ bool BlockCoverage::AppendCoverage(const std::string &S) {
// Coverage lines have this form:
// CN X Y Z T
// where N is the number of the function, T is the total number of instrumented
// BBs, and X,Y,Z, if present, are the indecies of covered BB.
// BBs, and X,Y,Z, if present, are the indices of covered BB.
// BB #0, which is the entry block, is not explicitly listed.
bool BlockCoverage::AppendCoverage(std::istream &IN) {
std::string L;
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/fuzzer/FuzzerFork.cpp
Expand Up @@ -358,7 +358,7 @@ void FuzzWithFork(Random &Rand, const FuzzingOptions &Options,

Env.RunOneMergeJob(Job.get());

// Continue if our crash is one of the ignorred ones.
// Continue if our crash is one of the ignored ones.
if (Options.IgnoreTimeouts && ExitCode == Options.TimeoutExitCode)
Env.NumTimeouts++;
else if (Options.IgnoreOOMs && ExitCode == Options.OOMExitCode)
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/fuzzer/FuzzerMerge.cpp
Expand Up @@ -378,7 +378,7 @@ void CrashResistantMerge(const std::vector<std::string> &Args,
}
auto ExitCode = ExecuteCommand(Cmd);
if (!ExitCode) {
VPrintf(V, "MERGE-OUTER: succesfull in %zd attempt(s)\n", Attempt);
VPrintf(V, "MERGE-OUTER: successful in %zd attempt(s)\n", Attempt);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
Expand Up @@ -398,7 +398,7 @@ static size_t InternalStrnlen(const char *S, size_t MaxLen) {
}

// Finds min of (strlen(S1), strlen(S2)).
// Needed bacause one of these strings may actually be non-zero terminated.
// Needed because one of these strings may actually be non-zero terminated.
static size_t InternalStrnlen2(const char *S1, const char *S2) {
size_t Len = 0;
for (; S1[Len] && S2[Len]; Len++) {}
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/interception/interception_win.cpp
Expand Up @@ -56,7 +56,7 @@
// tramp: jmp QWORD [addr]
// addr: .bytes <hook>
//
// Note: <real> is equilavent to <label>.
// Note: <real> is equivalent to <label>.
//
// 3) HotPatch
//
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/lib/msan/msan.h
Expand Up @@ -121,7 +121,7 @@ const MappingDesc kMemoryLayout[] = {
// The mappings below are used only for 48-bits VMA.
// TODO(unknown): 48-bit mapping ony covers the usual PIE, non-PIE
// segments and some more segments totalizing 262144GB of VMA (which cover
// only 0.32% of all 48-bit VMA). Memory avaliability can be increase by
// only 0.32% of all 48-bit VMA). Memory availability can be increase by
// adding multiple application segments like 39 and 42 mapping.
{0x0040000000000ULL, 0x0041000000000ULL, MappingDesc::INVALID, "invalid"},
{0x0041000000000ULL, 0x0042000000000ULL, MappingDesc::APP, "app-10"},
Expand Down Expand Up @@ -219,7 +219,7 @@ const MappingDesc kMemoryLayout[] = {
#elif SANITIZER_NETBSD || (SANITIZER_LINUX && SANITIZER_WORDSIZE == 64)

#ifdef MSAN_LINUX_X86_64_OLD_MAPPING
// Requries PIE binary and ASLR enabled.
// Requires PIE binary and ASLR enabled.
// Main thread stack and DSOs at 0x7f0000000000 (sometimes 0x7e0000000000).
// Heap at 0x600000000000.
const MappingDesc kMemoryLayout[] = {
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/msan/msan_interceptors.cpp
Expand Up @@ -1144,7 +1144,7 @@ INTERCEPTOR(int, __cxa_atexit, void (*func)(void *), void *arg,

// Unpoison argument shadow for C++ module destructors.
INTERCEPTOR(int, atexit, void (*func)()) {
// Avoid calling real atexit as it is unrechable on at least on Linux.
// Avoid calling real atexit as it is unreachable on at least on Linux.
if (msan_init_is_running)
return REAL(__cxa_atexit)((void (*)(void *a))func, 0, 0);
return setup_at_exit_wrapper((void(*)())func, 0, 0);
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/msan/msan_interface_internal.h
Expand Up @@ -31,7 +31,7 @@ SANITIZER_INTERFACE_ATTRIBUTE
void __msan_warning();

// Print a warning and die.
// Intrumentation inserts calls to this function when building in "fast" mode
// Instrumentation inserts calls to this function when building in "fast" mode
// (i.e. -mllvm -msan-keep-going)
SANITIZER_INTERFACE_ATTRIBUTE __attribute__((noreturn))
void __msan_warning_noreturn();
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/profile/InstrProfiling.h
Expand Up @@ -150,7 +150,7 @@ int __llvm_profile_write_file(void);
int __llvm_orderfile_write_file(void);
/*!
* \brief this is a wrapper interface to \c __llvm_profile_write_file.
* After this interface is invoked, a arleady dumped flag will be set
* After this interface is invoked, an already dumped flag will be set
* so that profile won't be dumped again during program exit.
* Invocation of interface __llvm_profile_reset_counters will clear
* the flag. This interface is designed to be used to collect profile
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/lib/profile/InstrProfilingInternal.h
Expand Up @@ -145,8 +145,8 @@ typedef struct VPDataReaderType {
uint32_t N);
} VPDataReaderType;

/* Write profile data to destinitation. If SkipNameDataWrite is set to 1,
the name data is already in destintation, we just skip over it. */
/* Write profile data to destination. If SkipNameDataWrite is set to 1,
the name data is already in destination, we just skip over it. */
int lprofWriteData(ProfDataWriter *Writer, VPDataReaderType *VPDataReader,
int SkipNameDataWrite);
int lprofWriteDataImpl(ProfDataWriter *Writer,
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/profile/InstrProfilingValue.c
Expand Up @@ -253,7 +253,7 @@ __llvm_profile_instrument_memop(uint64_t TargetValue, void *Data,
/*
* A wrapper struct that represents value profile runtime data.
* Like InstrProfRecord class which is used by profiling host tools,
* ValueProfRuntimeRecord also implements the abstract intefaces defined in
* ValueProfRuntimeRecord also implements the abstract interfaces defined in
* ValueProfRecordClosure so that the runtime data can be serialized using
* shared C implementation.
*/
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/profile/InstrProfilingWriter.c
Expand Up @@ -32,7 +32,7 @@ static uint32_t VPDataArraySize = sizeof(VPDataArray) / sizeof(*VPDataArray);
COMPILER_RT_VISIBILITY uint8_t *DynamicBufferIOBuffer = 0;
COMPILER_RT_VISIBILITY uint32_t VPBufferSize = 0;

/* The buffer writer is reponsponsible in keeping writer state
/* The buffer writer is responsible in keeping writer state
* across the call.
*/
COMPILER_RT_VISIBILITY uint32_t lprofBufferWriter(ProfDataWriter *This,
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sancov_flags.inc
Expand Up @@ -14,7 +14,7 @@
#endif

SANCOV_FLAG(bool, symbolize, true,
"If set, converage information will be symbolized by sancov tool "
"If set, coverage information will be symbolized by sancov tool "
"after dumping.")

SANCOV_FLAG(bool, help, false, "Print flags help.")
Expand Up @@ -625,7 +625,7 @@ class SizeClassAllocator64 {

static const uptr kRegionSize = kSpaceSize / kNumClassesRounded;
// FreeArray is the array of free-d chunks (stored as 4-byte offsets).
// In the worst case it may reguire kRegionSize/SizeClassMap::kMinSize
// In the worst case it may require kRegionSize/SizeClassMap::kMinSize
// elements, but in reality this will not happen. For simplicity we
// dedicate 1/8 of the region's virtual space to FreeArray.
static const uptr kFreeArraySize = kRegionSize / 8;
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_asm.h
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
//
// Various support for assemebler.
// Various support for assembler.
//
//===----------------------------------------------------------------------===//

Expand Down
Expand Up @@ -18,7 +18,7 @@ namespace __sanitizer {

// MIPS32 does not support atomics > 4 bytes. To address this lack of
// functionality, the sanitizer library provides helper methods which use an
// internal spin lock mechanism to emulate atomic oprations when the size is
// internal spin lock mechanism to emulate atomic operations when the size is
// 8 bytes.
static void __spin_lock(volatile int *lock) {
while (__sync_lock_test_and_set(lock, 1))
Expand Down
Expand Up @@ -17,7 +17,7 @@
// instantiated with the `LocalAddressSpaceView` type. This type is used to
// load any pointers in instance methods. This implementation is effectively
// a no-op. When an object is to be used in an out-of-process manner it is
// instansiated with the `RemoteAddressSpaceView` type.
// instantiated with the `RemoteAddressSpaceView` type.
//
// By making `AddressSpaceView` a template parameter of an object, it can
// change its implementation at compile time which has no run time overhead.
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cpp
Expand Up @@ -65,7 +65,7 @@ void BufferedStackTrace::Init(const uptr *pcs, uptr cnt, uptr extra_top_pc) {
top_frame_bp = 0;
}

// Sparc implemention is in its own file.
// Sparc implementation is in its own file.
#if !defined(__sparc__)

// In GCC on ARM bp points to saved lr, not fp, so we should check the next
Expand Down
Expand Up @@ -9,7 +9,7 @@
// This file is shared between AddressSanitizer and ThreadSanitizer
// run-time libraries.
//
// Implemention of fast stack unwinding for Sparc.
// Implementation of fast stack unwinding for Sparc.
//===----------------------------------------------------------------------===//

#if defined(__sparc__)
Expand Down
Expand Up @@ -21,7 +21,7 @@ namespace __sanitizer {

// Parsing helpers, 'str' is searched for delimiter(s) and a string or uptr
// is extracted. When extracting a string, a newly allocated (using
// InternalAlloc) and null-terminataed buffer is returned. They return a pointer
// InternalAlloc) and null-terminated buffer is returned. They return a pointer
// to the next characted after the found delimiter.
const char *ExtractToken(const char *str, const char *delims, char **result);
const char *ExtractInt(const char *str, const char *delims, int *result);
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/scudo/CMakeLists.txt
Expand Up @@ -30,7 +30,7 @@ if(ANDROID)
endif()
endif()

# The minimal Scudo runtime does not inlude the UBSan runtime.
# The minimal Scudo runtime does not include the UBSan runtime.
set(SCUDO_MINIMAL_OBJECT_LIBS
RTSanitizerCommonNoTermination
RTSanitizerCommonLibc
Expand Down
10 changes: 5 additions & 5 deletions compiler-rt/lib/tsan/rtl/tsan_clock.cpp
Expand Up @@ -72,9 +72,9 @@
// clk_ - variable size vector clock, low kClkBits hold timestamp,
// the remaining bits hold "acquired" flag (the actual value is thread's
// reused counter);
// if acquried == thr->reused_, then the respective thread has already
// if acquired == thr->reused_, then the respective thread has already
// acquired this clock (except possibly for dirty elements).
// dirty_ - holds up to two indeces in the vector clock that other threads
// dirty_ - holds up to two indices in the vector clock that other threads
// need to acquire regardless of "acquired" flag value;
// release_store_tid_ - denotes that the clock state is a result of
// release-store operation by the thread with release_store_tid_ index.
Expand Down Expand Up @@ -272,7 +272,7 @@ void ThreadClock::ReleaseStore(ClockCache *c, SyncClock *dst) {
// we could update the existing clock and cache it, or replace it with the
// currently cached clock and release the old one. And for a shared
// existing clock, we could replace it with the currently cached;
// or unshare, update and cache. But, for simplicity, we currnetly reuse
// or unshare, update and cache. But, for simplicity, we currently reuse
// cached clock only when the target clock is empty.
dst->tab_ = ctx->clock_alloc.Map(cached_idx_);
dst->tab_idx_ = cached_idx_;
Expand All @@ -285,7 +285,7 @@ void ThreadClock::ReleaseStore(ClockCache *c, SyncClock *dst) {
dst->dirty_[0].epoch = clk_[tid_];
dst->release_store_tid_ = tid_;
dst->release_store_reused_ = reused_;
// Rememeber that we don't need to acquire it in future.
// Remember that we don't need to acquire it in future.
dst->elem(tid_).reused = reused_;
// Grab a reference.
atomic_fetch_add(ref_ptr(dst->tab_), 1, memory_order_relaxed);
Expand Down Expand Up @@ -316,7 +316,7 @@ void ThreadClock::ReleaseStore(ClockCache *c, SyncClock *dst) {
for (uptr i = 0; i < kDirtyTids; i++) dst->dirty_[i].set_tid(kInvalidTid);
dst->release_store_tid_ = tid_;
dst->release_store_reused_ = reused_;
// Rememeber that we don't need to acquire it in future.
// Remember that we don't need to acquire it in future.
dst->elem(tid_).reused = reused_;

// If the resulting clock is cachable, cache it for future release operations.
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/tsan/rtl/tsan_clock.h
Expand Up @@ -213,7 +213,7 @@ class ThreadClock {
// We reuse it for subsequent store-release operations without intervening
// acquire operations. Since it is shared (and thus constant), clock value
// for the current thread is then stored in dirty entries in the SyncClock.
// We host a refernece to the table while it is cached here.
// We host a reference to the table while it is cached here.
u32 cached_idx_;
u16 cached_size_;
u16 cached_blocks_;
Expand Down

0 comments on commit a1e7e40

Please sign in to comment.