From 41419131095d36fb5b811600ad0dab3b0d804269 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sat, 7 May 2022 21:55:53 +0300 Subject: [PATCH] Fix typos (#69011) --- docs/coding-guidelines/EventLogging.md | 2 +- docs/design/coreclr/botr/dac-notes.md | 2 +- .../coreclr/botr/managed-type-system.md | 2 +- docs/design/coreclr/jit/variabletracking.md | 2 +- .../coreclr/profiling/IL Rewriting Basics.md | 2 +- docs/design/features/event-counter.md | 2 +- docs/design/features/hosting-layer-apis.md | 4 +- docs/design/features/native-hosting.md | 2 +- docs/design/features/standalone-gc-loading.md | 2 +- docs/design/features/tiered-compilation.md | 2 +- docs/workflow/ci/triaging-failures.md | 8 +- .../templates/runtimes/build-test-job.yml | 4 +- .../src/System/Reflection/Associates.cs | 2 +- .../System/Reflection/Emit/MethodBuilder.cs | 2 +- .../System/Reflection/Emit/ModuleBuilder.cs | 2 +- .../Reflection/RuntimeCustomAttributeData.cs | 4 +- .../RuntimeExceptionHandlingClause.cs | 2 +- .../System/Threading/Interlocked.CoreCLR.cs | 2 +- .../debug/createdump/dumpwriterelf.cpp | 2 +- .../debug/daccess/dacdbiimplstackwalk.cpp | 4 +- src/coreclr/debug/daccess/gcdump_dac.cpp | 2 +- src/coreclr/debug/di/process.cpp | 2 +- src/coreclr/debug/di/rsclass.cpp | 8 +- src/coreclr/debug/di/rsenumerator.hpp | 2 +- src/coreclr/debug/di/rspriv.h | 6 +- src/coreclr/debug/di/rsthread.cpp | 4 +- src/coreclr/debug/di/rstype.cpp | 2 +- src/coreclr/debug/di/shimprocess.cpp | 2 +- .../ee/amd64/gen_amd64InstrDecode/README.md | 2 +- src/coreclr/debug/ee/controller.cpp | 2 +- src/coreclr/debug/ee/controller.h | 2 +- src/coreclr/debug/ee/debugger.cpp | 12 +- src/coreclr/debug/ee/debugger.h | 2 +- src/coreclr/debug/ee/funceval.cpp | 2 +- src/coreclr/debug/ee/rcthread.cpp | 2 +- src/coreclr/debug/inc/dacdbiinterface.h | 4 +- src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp | 2 +- src/coreclr/gc/env/gcenv.os.h | 4 +- src/coreclr/gc/env/volatile.h | 2 +- src/coreclr/gc/gc.cpp | 2 +- src/coreclr/gc/gcinterface.dac.h | 2 +- src/coreclr/gc/gcinterface.h | 12 +- src/coreclr/ilasm/assembler.cpp | 2 +- src/coreclr/inc/clrhost.h | 2 +- src/coreclr/inc/cordebug.idl | 4 +- src/coreclr/inc/corerror.xml | 2 +- src/coreclr/inc/corprof.idl | 6 +- src/coreclr/inc/daccess.h | 2 +- src/coreclr/inc/regex_base.h | 2 +- src/coreclr/inc/safewrap.h | 2 +- src/coreclr/inc/sstring.h | 2 +- src/coreclr/inc/utilcode.h | 2 +- src/coreclr/inc/volatile.h | 2 +- src/coreclr/jit/block.h | 2 +- src/coreclr/jit/codegenarm64.cpp | 2 +- src/coreclr/jit/codegenarmarch.cpp | 2 +- src/coreclr/jit/codegencommon.cpp | 6 +- src/coreclr/jit/codegenloongarch64.cpp | 4 +- src/coreclr/jit/compiler.cpp | 4 +- src/coreclr/jit/compiler.h | 12 +- src/coreclr/jit/ee_il_dll.cpp | 2 +- src/coreclr/jit/emit.cpp | 4 +- src/coreclr/jit/emit.h | 4 +- src/coreclr/jit/emitxarch.cpp | 4 +- src/coreclr/jit/emitxarch.h | 2 +- src/coreclr/jit/fgbasic.cpp | 2 +- src/coreclr/jit/fgehopt.cpp | 2 +- src/coreclr/jit/fgopt.cpp | 4 +- src/coreclr/jit/fgprofile.cpp | 2 +- src/coreclr/jit/gcencode.cpp | 4 +- src/coreclr/jit/gentree.cpp | 6 +- src/coreclr/jit/gentree.h | 6 +- src/coreclr/jit/hashbv.cpp | 2 +- src/coreclr/jit/hwintrinsic.cpp | 2 +- src/coreclr/jit/importer.cpp | 8 +- src/coreclr/jit/indirectcalltransformer.cpp | 2 +- src/coreclr/jit/jiteh.cpp | 2 +- src/coreclr/jit/layout.h | 2 +- src/coreclr/jit/lclvars.cpp | 4 +- src/coreclr/jit/lir.cpp | 2 +- src/coreclr/jit/loopcloning.cpp | 2 +- src/coreclr/jit/lsra.cpp | 2 +- src/coreclr/jit/lsra.h | 2 +- src/coreclr/jit/morph.cpp | 4 +- src/coreclr/jit/optcse.cpp | 2 +- src/coreclr/jit/optimizer.cpp | 2 +- src/coreclr/jit/simd.cpp | 4 +- src/coreclr/jit/target.h | 2 +- src/coreclr/jit/targetamd64.h | 2 +- src/coreclr/jit/targetx86.h | 2 +- src/coreclr/jit/unwind.h | 4 +- src/coreclr/jit/valuenum.cpp | 2 +- src/coreclr/jit/valuenum.h | 2 +- src/coreclr/md/enc/mdinternalrw.cpp | 2 +- src/coreclr/md/runtime/mdinternalro.cpp | 2 +- .../src/Internal/Runtime/MethodTable.cs | 2 +- .../nativeaot/Runtime/RestrictedCallouts.h | 2 +- .../nativeaot/Runtime/amd64/GcProbe.asm | 2 +- .../nativeaot/Runtime/amd64/StubDispatch.S | 2 +- .../nativeaot/Runtime/amd64/StubDispatch.asm | 2 +- src/coreclr/nativeaot/Runtime/eventtrace.cpp | 6 +- .../nativeaot/Runtime/eventtracebase.h | 4 +- .../nativeaot/Runtime/gcheaputilities.cpp | 2 +- .../nativeaot/Runtime/i386/GcProbe.asm | 2 +- src/coreclr/nativeaot/Runtime/inc/daccess.h | 2 +- src/coreclr/nativeaot/Runtime/stressLog.cpp | 2 +- src/coreclr/nativeaot/Runtime/thread.cpp | 3 +- .../src/System/GC.NativeAot.cs | 2 +- .../DelegateMethodInfoRetriever.cs | 2 +- .../TypeLoaderEnvironment.StaticsLookup.cs | 4 +- .../include/mach-o/compact_unwind_encoding.h | 80 +++++------ src/coreclr/pal/inc/pal.h | 2 +- src/coreclr/pal/src/cruntime/filecrt.cpp | 2 +- .../src/exception/compact_unwind_encoding.h | 80 +++++------ src/coreclr/pal/src/exception/seh-unwind.cpp | 2 +- src/coreclr/pal/src/exception/signal.cpp | 4 +- src/coreclr/pal/src/include/pal/signal.hpp | 2 +- src/coreclr/pal/src/objmgr/shmobject.cpp | 4 +- src/coreclr/pal/src/synchmgr/synchmanager.cpp | 4 +- .../c_runtime/rand_srand/test1/test1.cpp | 20 +-- .../c_runtime/wcsrchr/test1/test1.cpp | 4 +- .../pal_composite_native_cs.cpp | 104 +++++++------- .../pal_composite_native_cs.cpp | 104 +++++++------- .../test2/pal_except_filter_ex.cpp | 20 +-- .../file_io/CopyFileA/test4/test4.cpp | 28 ++-- .../file_io/CopyFileW/test3/test3.cpp | 48 +++---- .../file_io/SearchPathW/test1/SearchPathW.cpp | 2 +- .../LoadLibraryA/test6/loadlibrarya.cpp | 2 +- .../LoadLibraryA/test8/loadlibrarya.cpp | 2 +- .../test2/CreateMutexW.cpp | 16 +-- .../threading/DuplicateHandle/test1/test1.cpp | 28 ++-- .../DuplicateHandle/test12/test12.cpp | 20 +-- .../threading/DuplicateHandle/test2/test2.cpp | 6 +- .../threading/DuplicateHandle/test9/test9.cpp | 26 ++-- src/coreclr/scripts/antigen_summarize.py | 10 +- src/coreclr/scripts/fuzzlyn_summarize.py | 6 +- .../Compiler/DevirtualizationManager.cs | 4 +- .../NativeFormat/Generator/PublicGen.cs | 2 +- .../tools/Common/JitInterface/CorInfoTypes.cs | 2 +- .../ThunkGenerator/ThunkInput.txt | 2 +- .../TypeSystem/Common/TypeSystemHelpers.cs | 2 +- .../Common/VirtualMethodAlgorithm.cs | 2 +- .../StressLogAnalyzer/StressLogPlugin.cpp | 2 +- .../Compiler/LibraryInitializers.cs | 6 +- .../MethodImportationErrorProvider.cs | 2 +- src/coreclr/tools/aot/ILCompiler/Program.cs | 10 +- .../aot/ILLink.Shared/SharedStrings.resx | 56 ++++---- src/coreclr/tools/aot/crossgen2/Program.cs | 2 +- src/coreclr/unwinder/amd64/dbs_stack_x64.cpp | 2 +- src/coreclr/unwinder/amd64/unwinder_amd64.cpp | 8 +- src/coreclr/unwinder/arm/unwinder_arm.cpp | 2 +- src/coreclr/unwinder/arm64/unwinder_arm64.cpp | 4 +- src/coreclr/unwinder/i386/unwinder_i386.cpp | 4 +- .../loongarch64/unwinder_loongarch64.cpp | 4 +- src/coreclr/utilcode/executableallocator.cpp | 10 +- src/coreclr/utilcode/stresslog.cpp | 16 +-- .../vm/amd64/RedirectedHandledJITCase.asm | 2 +- src/coreclr/vm/amd64/gmscpu.h | 2 +- src/coreclr/vm/appdomain.cpp | 4 +- src/coreclr/vm/appdomain.hpp | 4 +- src/coreclr/vm/arm/gmscpu.h | 2 +- src/coreclr/vm/ceeload.h | 2 +- src/coreclr/vm/ceemain.cpp | 14 +- src/coreclr/vm/classhash.cpp | 2 +- src/coreclr/vm/classlayoutinfo.cpp | 2 +- src/coreclr/vm/codeman.cpp | 6 +- src/coreclr/vm/comcache.cpp | 2 +- src/coreclr/vm/comcache.h | 2 +- src/coreclr/vm/comdynamic.cpp | 2 +- src/coreclr/vm/commodule.h | 2 +- src/coreclr/vm/comtoclrcall.cpp | 2 +- src/coreclr/vm/comutilnative.cpp | 2 +- src/coreclr/vm/debugdebugger.cpp | 2 +- src/coreclr/vm/dwreport.h | 2 +- src/coreclr/vm/eepolicy.cpp | 10 +- src/coreclr/vm/eetwain.cpp | 2 +- src/coreclr/vm/excep.cpp | 6 +- src/coreclr/vm/exceptionhandling.cpp | 2 +- src/coreclr/vm/frames.h | 4 +- src/coreclr/vm/gcheaputilities.cpp | 4 +- src/coreclr/vm/hillclimbing.cpp | 2 +- .../vm/i386/RedirectedHandledJITCase.asm | 2 +- src/coreclr/vm/i386/cgenx86.cpp | 2 +- src/coreclr/vm/i386/excepx86.cpp | 2 +- src/coreclr/vm/i386/gmscpu.h | 6 +- src/coreclr/vm/i386/gmsx86.cpp | 2 +- src/coreclr/vm/interoplibinterface_objc.cpp | 2 +- src/coreclr/vm/jithelpers.cpp | 2 +- src/coreclr/vm/jitinterface.cpp | 12 +- src/coreclr/vm/method.hpp | 2 +- src/coreclr/vm/methodtable.cpp | 2 +- src/coreclr/vm/methodtablebuilder.cpp | 2 +- src/coreclr/vm/object.h | 2 +- src/coreclr/vm/object.inl | 2 +- src/coreclr/vm/olevariant.cpp | 2 +- src/coreclr/vm/profilinghelper.cpp | 2 +- src/coreclr/vm/runtimecallablewrapper.cpp | 2 +- src/coreclr/vm/siginfo.cpp | 2 +- src/coreclr/vm/syncblk.h | 4 +- src/coreclr/vm/threads.cpp | 2 +- src/coreclr/vm/threads.h | 2 +- src/coreclr/vm/threadsuspend.cpp | 2 +- src/coreclr/vm/virtualcallstub.cpp | 4 +- .../Microsoft.NET.HostModel/Bundle/Bundler.cs | 2 +- .../ResolveComponentDependencies.cs | 8 +- .../RollForwardOnNoCandidateFx.cs | 2 +- .../Versioning/NonVersionableAttribute.cs | 2 +- .../ComInterop/ComRuntimeHelpers.cs | 2 +- .../DefaultHttpClientFactoryTest.cs | 2 +- .../CodeDom/CodeArrayCreateExpressionTests.cs | 2 +- .../Registration/PartBuilderOfT.cs | 2 +- .../Composition/ChangeRejectedException.cs | 2 +- .../Composition/Hosting/ImportEngine.cs | 4 +- .../src/System.Composition.csproj | 4 +- .../src/System/ConsolePal.Unix.cs | 2 +- .../src/System/Data/DataRow.cs | 2 +- .../System/Data/Odbc/OdbcMetaDataFactory.cs | 2 +- .../DbConnectionInternal.Shared.cs | 2 +- .../Diagnostics/Activity.DateTime.netfx.cs | 4 +- .../Reader/EventRecordWrittenEventArgs.cs | 2 +- .../src/misc/EnvironmentHelpers.cs | 6 +- .../SafeHandles/SafeProcessHandle.Unix.cs | 2 +- ...namic.context.method.regmethod.regclass.cs | 2 +- .../System/Formats/Asn1/AsnDecoder.Text.cs | 2 +- .../src/System/Formats/Tar/TarFile.cs | 2 +- .../src/System/Formats/Tar/TarReader.cs | 2 +- .../src/System/Formats/Tar/TarWriter.cs | 4 +- .../FileSystemWatcher.MultipleWatchers.cs | 30 ++-- .../tests/FileSystemWatcher.unit.cs | 18 +-- .../tests/Utility/FileSystemWatcherTest.cs | 28 ++-- .../System.Linq/src/System/Linq/Select.cs | 2 +- .../System/Management/ManagementBaseObject.cs | 2 +- .../Management/ManagementEventWatcher.cs | 2 +- .../tests/Base64/Base64DecoderUnitTests.cs | 20 +-- .../tests/Base64/Base64EncoderUnitTests.cs | 10 +- .../tests/Base64/Base64TestHelper.cs | 4 +- .../System/Net/Http/HttpTelemetry.AnyOS.cs | 2 +- .../MailAddressTests/MailAddressParserTest.cs | 4 +- .../NetworkAddressChange.Windows.cs | 2 +- .../NetworkInformation/Ping.PingUtility.cs | 2 +- .../TlsCipherSuiteNameParser.ttinclude | 6 +- .../SslStress/Utils/StressTaskExtensions.cs | 2 +- .../Net/WebSockets/WebSocketDeflateOptions.cs | 4 +- .../Tools/GenUnicodeProp/Program.cs | 2 +- .../System/Collections/Generic/Dictionary.cs | 2 +- .../src/System/GCMemoryInfo.cs | 10 +- .../Globalization/DateTimeFormatInfo.cs | 2 +- .../PortableThreadPool.HillClimbing.cs | 2 +- .../JavaScript/JSObject.References.cs | 2 +- .../UriBuilderParameterTest.cs | 3 - .../System/Xml/Schema/XmlSchemaValidator.cs | 2 +- .../src/System/Xml/Schema/XsdValidator.cs | 2 +- .../src/System/Xml/Xsl/Xslt/QilGenerator.cs | 2 +- .../ModuleBuilderDefineUninitializedData.cs | 2 +- .../Analyzers/ConvertToLibraryImportFixer.cs | 2 +- .../CompilerServices/RuntimeHelpersTests.cs | 6 +- .../tests/RevocationTests/TimeoutTests.cs | 2 +- .../src/Resources/Strings.resx | 4 +- .../Security/Cryptography/PemEncoding.cs | 2 +- .../src/Recognition/RecognizerBase.cs | 6 +- .../gen/JsonSourceGenerator.Emitter.cs | 6 +- .../gen/RegexGenerator.Emitter.cs | 4 +- .../Text/RegularExpressions/Regex.Match.cs | 2 +- .../Text/RegularExpressions/RegexCompiler.cs | 2 +- .../Transactions/Configuration/AppSettings.cs | 8 +- src/mono/mono/component/hot_reload.c | 12 +- src/mono/mono/metadata/class-init.c | 2 +- src/mono/mono/metadata/class-setup-vtable.c | 2 +- src/mono/mono/metadata/icall.c | 2 +- src/mono/mono/metadata/marshal.c | 2 +- src/mono/mono/metadata/object.c | 2 +- src/mono/mono/mini/abcremoval.c | 2 +- src/mono/mono/mini/aot-compiler.c | 4 +- src/mono/mono/mini/aot-runtime.c | 2 +- src/mono/mono/mini/interp/transform.c | 2 +- src/mono/mono/mini/method-to-ir.c | 4 +- src/mono/mono/mini/mini-arm64.c | 2 +- src/mono/mono/mini/mini-gc.c | 2 +- src/mono/mono/mini/mini-llvm.c | 2 +- src/mono/mono/mini/mini-ops.h | 2 +- src/mono/mono/mini/mini-posix.c | 2 +- src/mono/mono/mini/mini-x86.h | 6 +- src/mono/mono/sgen/sgen-conf.h | 2 +- src/mono/mono/tests/bug-60862.cs | 4 +- src/mono/mono/tests/verifier/make_tests.sh | 4 +- src/mono/mono/utils/dlmalloc.c | 6 +- .../mono/utils/mono-log-flight-recorder.c | 2 +- .../mono/utils/mono-threads-mach-helper.c | 2 +- .../mono/utils/mono-threads-state-machine.c | 2 +- src/native/corehost/fxr/fx_resolver.cpp | 2 +- src/native/corehost/fxr/hostfxr.cpp | 4 +- src/native/corehost/hostfxr.h | 2 +- src/native/corehost/hostpolicy/hostpolicy.cpp | 4 +- .../hostpolicy/hostpolicy_context.cpp | 6 +- src/native/eventpipe/ep-thread.h | 2 +- src/native/eventpipe/ep.c | 2 +- .../pal_icushim_internal.h | 4 +- .../System.IO.Compression.Native/pal_zlib.h | 6 +- .../pal_hmac.c | 2 +- src/tasks/AotCompilerTask/MonoAOTCompiler.cs | 2 +- src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs | 2 +- src/tasks/WasmAppBuilder/EmccCompile.cs | 4 +- src/tests/Common/scripts/migrate-tags.py | 58 ++++---- src/tests/GC/Scenarios/Dynamo/dynamo.cs | 2 +- .../Interop/BestFitMapping/BestFitMapping.cs | 130 +++++++++--------- .../SimpleStruct/SimpleStructManaged.cs | 4 +- .../JIT/Performance/CodeQuality/SciMark/LU.cs | 22 +-- .../CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il | 36 ++--- src/tests/readytorun/tests/main.cs | 18 +-- src/tests/run.py | 4 +- .../diagnosticport/diagnosticport.cs | 46 +++---- 311 files changed, 981 insertions(+), 985 deletions(-) diff --git a/docs/coding-guidelines/EventLogging.md b/docs/coding-guidelines/EventLogging.md index 8d581cb2925..39150ae8767 100644 --- a/docs/coding-guidelines/EventLogging.md +++ b/docs/coding-guidelines/EventLogging.md @@ -16,4 +16,4 @@ Event Logging is a mechanism by which CoreClr can provide a variety of informati # Adding New Logging System -Though the the Event logging system was designed for ETW, the build system provides a mechanism, basically an [adapter script- genEventing.py](../../src/coreclr/scripts/genEventing.py) so that other Logging System can be added and used by CoreClr. An Example of such an extension for [LTTng logging system](https://lttng.org/) can be found in [genLttngProvider.py](../../src/coreclr/scripts/genLttngProvider.py ) +Though the Event logging system was designed for ETW, the build system provides a mechanism, basically an [adapter script- genEventing.py](../../src/coreclr/scripts/genEventing.py) so that other Logging System can be added and used by CoreClr. An Example of such an extension for [LTTng logging system](https://lttng.org/) can be found in [genLttngProvider.py](../../src/coreclr/scripts/genLttngProvider.py ) diff --git a/docs/design/coreclr/botr/dac-notes.md b/docs/design/coreclr/botr/dac-notes.md index 2d2d1511ba7..ad0abcdd284 100644 --- a/docs/design/coreclr/botr/dac-notes.md +++ b/docs/design/coreclr/botr/dac-notes.md @@ -119,7 +119,7 @@ This uses the `RidMap` to lookup the `MethodDesc`. If you look at the definition This represents a target address, but it's not really a pointer; it's simply a number (although it represents an address). The problem is that `LookupMethodDef` needs to return the address of a `MethodDesc` that we can dereference. To accomplish this, the function uses a `dac_cast` to `PTR_MethodDesc` to convert the `TADDR` to a `PTR_MethodDesc`. You can think of this as the target address space form of a cast from `void *` to `MethodDesc *`. In fact, this code would be slightly cleander if `GetFromRidMap` returned a `PTR_VOID` (with pointer semantics) instead of a `TADDR` (with integer semantics). Again, the type conversion implicit in the return statement ensures that the DAC marshals the object (if necessary) and returns the host address of the `MethodDesc` in the DAC cache. -The assignment statement in `GetFromRidMap` indexes an array to get a particular value. The `pMap` parameter is the address of a structure field from the `MethodDesc`. As such, the DAC will have copied the entire field into the cache when it marshaled the `MethodDesc` instance. Thus, `pMap`, which is the address of this struct, is a host pointer. Dereferencing it does not involve the DAC at all. The `pTable` field, however, is a `PTR_TADDR`. What this tells us is that `pTable` is an array of target addresses, but its type indicates that it is a marshaled type. This means that `pTable` will be a target address as well. We dereference it with the overloaded indexing operator for the `PTR` type. This will get the target address of the array and compute the target address of the element we want. The last step of indexing marshals the array element back to a host instance in the DAC cache and returns its value. We assign the the element (a `TADDR`) to the local variable result and return it. +The assignment statement in `GetFromRidMap` indexes an array to get a particular value. The `pMap` parameter is the address of a structure field from the `MethodDesc`. As such, the DAC will have copied the entire field into the cache when it marshaled the `MethodDesc` instance. Thus, `pMap`, which is the address of this struct, is a host pointer. Dereferencing it does not involve the DAC at all. The `pTable` field, however, is a `PTR_TADDR`. What this tells us is that `pTable` is an array of target addresses, but its type indicates that it is a marshaled type. This means that `pTable` will be a target address as well. We dereference it with the overloaded indexing operator for the `PTR` type. This will get the target address of the array and compute the target address of the element we want. The last step of indexing marshals the array element back to a host instance in the DAC cache and returns its value. We assign the element (a `TADDR`) to the local variable result and return it. Finally, to get the code address, the DAC/DBI interface function will call `MethodDesc::GetNativeCode`. This function returns a value of type `PCODE`. This type is a target address, but one that we cannot dereference (it is just an alias of `TADDR`) and one that we use specifically to specify a code address. We store this value on the `ICorDebugFunction` instance and return it to the debugger. diff --git a/docs/design/coreclr/botr/managed-type-system.md b/docs/design/coreclr/botr/managed-type-system.md index c24e440ffb7..582681c5696 100644 --- a/docs/design/coreclr/botr/managed-type-system.md +++ b/docs/design/coreclr/botr/managed-type-system.md @@ -101,7 +101,7 @@ Exception throwing within the type system is wrapped in a `ThrowHelper` class. T The type system provides a default implementation of the `ThrowHelper` class that throws exceptions deriving from a `TypeSystemException` exception base class. This default implementation is suitable for use in non-runtime scenarios. -The exception messages are assigned string IDs and get consumed by the throw helper as well. We require this indirection to support the compiler scenarios: when a type loading exception occurs during an AOT compilation, the AOT compiler has two tasks - emit a warning to warn the user that this occured, and potentially generate a method body that will throw this exception at runtime when the problematic type is accessed. The localization of the compiler might not match the localization of the class library the compiler output is linking against. Indirecting the actual exception message through the string ID lets us wrap this. The consumer of the type system may reuse the throw helper in places outside the type system where this functionality is needed. +The exception messages are assigned string IDs and get consumed by the throw helper as well. We require this indirection to support the compiler scenarios: when a type loading exception occurs during an AOT compilation, the AOT compiler has two tasks - emit a warning to warn the user that this occurred, and potentially generate a method body that will throw this exception at runtime when the problematic type is accessed. The localization of the compiler might not match the localization of the class library the compiler output is linking against. Indirecting the actual exception message through the string ID lets us wrap this. The consumer of the type system may reuse the throw helper in places outside the type system where this functionality is needed. ## Physical architecture diff --git a/docs/design/coreclr/jit/variabletracking.md b/docs/design/coreclr/jit/variabletracking.md index c4f86a6cd56..2533f92e115 100644 --- a/docs/design/coreclr/jit/variabletracking.md +++ b/docs/design/coreclr/jit/variabletracking.md @@ -198,7 +198,7 @@ On `BasicBlock` boundaries: This is handled in `LinearScan::recordVarLocationsAtStartOfBB(BasicBlock* bb)`. - If a variable doesn't have an open `VariableLiveRange` and is in `bbLiveIn`, we open one. - This is done in `genUpdateLife` immediately after the the previous method is called. + This is done in `genUpdateLife` immediately after the previous method is called. - If a variable has an open `VariableLiveRange` and is not in `bbLiveIn`, we close it. This is handled in `genUpdateLife` too. diff --git a/docs/design/coreclr/profiling/IL Rewriting Basics.md b/docs/design/coreclr/profiling/IL Rewriting Basics.md index 1acc97fdaf0..51b1ff281f3 100644 --- a/docs/design/coreclr/profiling/IL Rewriting Basics.md +++ b/docs/design/coreclr/profiling/IL Rewriting Basics.md @@ -11,7 +11,7 @@ One of the common use cases of the `ICorProfiler*` interfaces is to perform IL r There are two ways to rewrite IL 1. At Module load time with `ICorProfilerInfo::SetILFunctionBody` - This approach has the benefit that it is 'set it and forget it'. You can replace the IL at module load, and the runtime will treat this new IL as if the module contained that IL - you don't have to worry about any of the quirks of ReJIT. The downside is that is is unrevertable - once it is set, you cannot change your mind. + This approach has the benefit that it is 'set it and forget it'. You can replace the IL at module load, and the runtime will treat this new IL as if the module contained that IL - you don't have to worry about any of the quirks of ReJIT. The downside is that it is unrevertable - once it is set, you cannot change your mind. 2. At any point during the process lifetime with `ICorProfilerInfo4::RequestReJIT` or `ICorProfilerInfo10::RequestReJITWithInliners`. This approach means that you can modify functions in response to changing conditions, and you can revert the modified code if you decide you are done with it. See the other entries about ReJIT in this folder for more information. diff --git a/docs/design/features/event-counter.md b/docs/design/features/event-counter.md index 935a42b47f8..c8bad96dab1 100644 --- a/docs/design/features/event-counter.md +++ b/docs/design/features/event-counter.md @@ -14,7 +14,7 @@ When EventCounter was first designed, it was tailored towards aggregating a set ### Multi-client support ### -**Emit data to all sessions at the rates requested by all clients** - This requires a little extra complexity in the runtime to maintain potentially multiple concurrent aggregations, and it is more verbose in the event stream if that is occuring. Clients need to filter out responses that don't match their requested rate, which is a little more complex than ideal, but still simpler than needing to synthesize statistics. In the case of multiple clients we can still encourage people to use a few canonical rates such as per-second, per-10 seconds, per-minute, per-hour which makes it likely that similar use cases will be able to share the exact same set of events. In the worst case that a few different aggregations are happening in parallel the overhead of our common counter aggregations shouldn't be that high, otherwise they weren't very suitable for lightweight monitoring in the first place. In terms of runtime code complexity I think the difference between supporting 1 aggregation and N aggregations is probably <50 lines per counter type and we only have a few counter types. +**Emit data to all sessions at the rates requested by all clients** - This requires a little extra complexity in the runtime to maintain potentially multiple concurrent aggregations, and it is more verbose in the event stream if that is occurring. Clients need to filter out responses that don't match their requested rate, which is a little more complex than ideal, but still simpler than needing to synthesize statistics. In the case of multiple clients we can still encourage people to use a few canonical rates such as per-second, per-10 seconds, per-minute, per-hour which makes it likely that similar use cases will be able to share the exact same set of events. In the worst case that a few different aggregations are happening in parallel the overhead of our common counter aggregations shouldn't be that high, otherwise they weren't very suitable for lightweight monitoring in the first place. In terms of runtime code complexity I think the difference between supporting 1 aggregation and N aggregations is probably <50 lines per counter type and we only have a few counter types. Doing the filtering requires that each client can identify which EventCounter data packets are the ones it asked for and which are unrelated. Using IntervalSec as I had originally intended does not work because IntervalSec contains the exact amount of time measured in each interval rather than the nominal interval the client requested. For example a client that asks for EventCounterIntervalSec=1 could see packets that have IntervalSec=1.002038, IntervalSec=0.997838, etc. To resolve this we will add another key/pair to the payload, Series="Interval=T", where T is the number of seconds that was passed to EventCounterIntervalSec. To ensure clients with basically the same needs don't arbitrarily create different series that are identical or near identical we enforce that IntervalSec is always a whole non-negative number of seconds. Any value that can't be parsed by uint.TryParse() will be interpreted the same as IntervalSec=0. Using leading zeros on the number, ie IntervalSec=0002 may or may not work so clients are discouraged from doing so (in practice, its whatever text uint.TryParse handles). diff --git a/docs/design/features/hosting-layer-apis.md b/docs/design/features/hosting-layer-apis.md index f15a0fc2b9e..ae5170c60f6 100644 --- a/docs/design/features/hosting-layer-apis.md +++ b/docs/design/features/hosting-layer-apis.md @@ -208,7 +208,7 @@ int hostfxr_get_runtime_properties( ``` Get all runtime properties for the specified host context. * `host_context_handle` - initialized host context. If set to `nullptr` the function will operate on the first host context in the process. -* `count` - in/out parameter which must not be `nullptr`. On input it specifies the size of the the `keys` and `values` buffers. On output it contains the number of entries used from `keys` and `values` buffers - the number of properties returned. +* `count` - in/out parameter which must not be `nullptr`. On input it specifies the size of the `keys` and `values` buffers. On output it contains the number of entries used from `keys` and `values` buffers - the number of properties returned. * `keys` - buffer which acts as an array of pointers to buffers with keys for the runtime properties. * `values` - buffer which acts as an array of pointer to buffers with values for the runtime properties. @@ -259,7 +259,7 @@ int corehost_load(host_interface_t *init) Initialize `hostpolicy`. This stores information that will be required to do all the processing necessary to start CoreCLR, but it does not actually do any of that processing. * `init` - structure defining how the library should be initialized -If already initalized, this function returns success without reinitializing (`init` is ignored). +If already initialized, this function returns success without reinitializing (`init` is ignored). ``` C int corehost_main(const int argc, const char_t* argv[]) diff --git a/docs/design/features/native-hosting.md b/docs/design/features/native-hosting.md index eea04e08666..1d83c4b5cf5 100644 --- a/docs/design/features/native-hosting.md +++ b/docs/design/features/native-hosting.md @@ -334,7 +334,7 @@ int hostfxr_get_runtime_properties( Returns the full set of all runtime properties for the specified host context. * `host_context_handle` - the initialized host context. If set to `NULL` the function will operate on runtime properties of the first host context in the process. -* `count` - in/out parameter which must not be `NULL`. On input it specifies the size of the the `keys` and `values` buffers. On output it contains the number of entries used from `keys` and `values` buffers - the number of properties returned. If the size of the buffers is too small, the function returns a specific error code and fill the `count` with the number of available properties. If `keys` or `values` is `NULL` the function ignores the input value of `count` and just returns the number of properties. +* `count` - in/out parameter which must not be `NULL`. On input it specifies the size of the `keys` and `values` buffers. On output it contains the number of entries used from `keys` and `values` buffers - the number of properties returned. If the size of the buffers is too small, the function returns a specific error code and fill the `count` with the number of available properties. If `keys` or `values` is `NULL` the function ignores the input value of `count` and just returns the number of properties. * `keys` - buffer which acts as an array of pointers to buffers with keys for the runtime properties. * `values` - buffer which acts as an array of pointer to buffers with values for the runtime properties. diff --git a/docs/design/features/standalone-gc-loading.md b/docs/design/features/standalone-gc-loading.md index ed7440002e8..b9bc3817cb5 100644 --- a/docs/design/features/standalone-gc-loading.md +++ b/docs/design/features/standalone-gc-loading.md @@ -177,7 +177,7 @@ GC. ## Outstanding Questions How can we provide the most useful error message when a standalone GC fails to load? In the past it has been difficult -to determine what preciscely has gone wrong with `coreclr_initialize` returns a HRESULT and no indication of what occured. +to determine what preciscely has gone wrong with `coreclr_initialize` returns a HRESULT and no indication of what occurred. Same question for the DAC - Is `E_FAIL` the best we can do? If we could define our own error for DAC/GC version mismatches, that would be nice; however, that is technically a breaking change in the DAC. diff --git a/docs/design/features/tiered-compilation.md b/docs/design/features/tiered-compilation.md index 8e10940b7bd..08633fa462e 100644 --- a/docs/design/features/tiered-compilation.md +++ b/docs/design/features/tiered-compilation.md @@ -66,7 +66,7 @@ There are two mechanisms that need to be satisfied in order for a Tier0 method t 1. The method needs to be called at least 30 times, as measured by the call counter, and this gives us a rough notion that the method is 'hot'. The number 30 was derived with a small amount of early empirical testing but there hasn't been a large amount of effort applied in checking if the number is optimal. We assumed that both the policy and the sample benchmarks we were measuring would be in a state of flux for a while to come so there wasn't much reason to spend a lot of time finding the exact maximum of a shifting curve. As best we can tell there is also not a steep response between changes in this value and changes in the performance of many scenarios. An order of magnitude should produce a notable difference but +-5 can vanish into the noise. -2. At startup a timer is initiated with a 100ms timeout. If any Tier0 jitting occurs while the timer is running then it is reset. If the timer completes without any Tier0 jitting then, and only then, is call counting allowed to commence. This means a method could be called 1000 times in the first 100ms, but the timer will still need to expire and have the method called 30 more times before it is eligible for Tier1. The reason for the timer is to measure whether or not Tier0 jitting is still occuring, which is a heuristic to measure whether or not the application is still in its startup phase. Before adding the timer we observed that both the call counter and background threads compiling Tier1 code versions were slowing down the foreground threads trying to complete startup, and this could result in losing all the startup performance wins from Tier0 jitting. By delaying until after 'startup' the Tier0 code is left running longer, but that was nearly always a better performing outcome than trying to replace it with Tier1 code too eagerly. +2. At startup a timer is initiated with a 100ms timeout. If any Tier0 jitting occurs while the timer is running then it is reset. If the timer completes without any Tier0 jitting then, and only then, is call counting allowed to commence. This means a method could be called 1000 times in the first 100ms, but the timer will still need to expire and have the method called 30 more times before it is eligible for Tier1. The reason for the timer is to measure whether or not Tier0 jitting is still occurring, which is a heuristic to measure whether or not the application is still in its startup phase. Before adding the timer we observed that both the call counter and background threads compiling Tier1 code versions were slowing down the foreground threads trying to complete startup, and this could result in losing all the startup performance wins from Tier0 jitting. By delaying until after 'startup' the Tier0 code is left running longer, but that was nearly always a better performing outcome than trying to replace it with Tier1 code too eagerly. After these two conditions are satisfied the method is placed in a queue for Tier1 compilation, compiled on a background thread, and then the Tier1 version is made active. diff --git a/docs/workflow/ci/triaging-failures.md b/docs/workflow/ci/triaging-failures.md index b16cf0239b0..471504682f7 100644 --- a/docs/workflow/ci/triaging-failures.md +++ b/docs/workflow/ci/triaging-failures.md @@ -30,7 +30,7 @@ You need to be careful when reproducing failures to set all the correct environm test failure console log, you find: ``` -C:\h\w\AE88094B\w\B1B409BF\e>set COMPlus +C:\h\w\AE88094B\w\B1B409BF\e>set COMPlus COMPlus_JitStress=1 COMPlus_TieredCompilation=0 ``` @@ -50,7 +50,7 @@ COMPlus_DbgEnableMiniDump=1 You might need to set variables in addition to the `COMPlus_*` (equivalently, `DOTNET_*`) variables. For example, you might see: ``` -set RunCrossGen2=1 +set RunCrossGen2=1 ``` which instructs the coreclr test wrapper script to do crossgen2 compilation of the test. @@ -128,7 +128,7 @@ Jobs | where Type1 contains test_name and Status <> "Pass" and (Method == "cmd" or Method == "sh") | project Queued, Pipeline = parse_json(Properties).DefinitionName, Pipeline_Configuration = parse_json(Properties).configuration, - OS = QueueName, Arch = parse_json(Properties).architecture, Test = Type1, Result, Duration, Console_log = Message, WorkItemFriendlyName, Method + OS = QueueName, Arch = parse_json(Properties).architecture, Test = Type1, Result, Duration, Console_log = Message, WorkItemFriendlyName, Method | order by Queued desc | limit 100 ``` @@ -194,7 +194,7 @@ of failures: - A bug in the GC stress infrastructure. - A bug in the GC itself. -Note the the value `COMPlus_GCStress` is set to is a bitmask. Failures with 0x1 or 0x2 (and thus 0x3) are typically VM failures. +Note the value `COMPlus_GCStress` is set to is a bitmask. Failures with 0x1 or 0x2 (and thus 0x3) are typically VM failures. Failures with 0x4 or 0x8 (and thus 0xC) are typically JIT failures. Ideally, a failure can be reduced to fail with only a single bit set (that is, either 0x4 or 0x8, which is more specific than just 0xC). That is especially true for 0xF, where we don't know if it's likely a VM or a JIT failure without reducing it. diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index 51fb5ea58c0..c25353378cf 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -17,7 +17,7 @@ parameters: pgoType: '' ### Build managed test components (native components are getting built as part -### of the the product build job). +### of the product build job). ### TODO: As of today, build of managed test components requires the product build ### as a prerequisite due to dependency on System.Private.Corelib. After switching @@ -97,7 +97,7 @@ jobs: - name: testTreeFilterArg value: '' - + # Only build GCSimulator tests when the gc-simulator group is specified. - ${{ if eq(parameters.testGroup, 'gc-simulator') }}: - ${{ if eq(parameters.osGroup, 'windows') }}: diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Associates.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Associates.cs index e6086c81f5d..14ca40af626 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Associates.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Associates.cs @@ -36,7 +36,7 @@ namespace System.Reflection Justification = "Module.ResolveMethod is marked as RequiresUnreferencedCode because it relies on tokens" + "which are not guaranteed to be stable across trimming. So if somebody hardcodes a token it could break." + "The usage here is not like that as all these tokens come from existing metadata loaded from some IL" + - "and so trimming has no effect (the tokens are read AFTER trimming occured).")] + "and so trimming has no effect (the tokens are read AFTER trimming occurred).")] private static RuntimeMethodInfo? AssignAssociates( int tkMethod, RuntimeType declaredType, diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs index 47be41675c1..10da169b3e3 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs @@ -552,7 +552,7 @@ namespace System.Reflection.Emit // will overflow the stack when there are many methods on the same type (10000 in my experiment). // The change also introduced race conditions. Before the code change GetToken is called from // the MethodBuilder .ctor which is protected by lock(ModuleBuilder.SyncRoot). Now it - // could be called more than once on the the same method introducing duplicate (invalid) tokens. + // could be called more than once on the same method introducing duplicate (invalid) tokens. // I don't fully understand this change. So I will keep the logic and only fix the recursion and // the race condition. diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs index eee44ef3e7e..a076bf32fd1 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs @@ -397,7 +397,7 @@ namespace System.Reflection.Emit Justification = "Module.ResolveMethod is marked as RequiresUnreferencedCode because it relies on tokens " + "which are not guaranteed to be stable across trimming. So if somebody hardcodes a token it could break. " + "The usage here is not like that as all these tokens come from existing metadata loaded from some IL " + - "and so trimming has no effect (the tokens are read AFTER trimming occured).")] + "and so trimming has no effect (the tokens are read AFTER trimming occurred).")] private static MethodBase GetGenericMethodBaseDefinition(MethodBase methodBase) { // methodInfo = G.M ==> methDef = G.M diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs index 9f427179472..b3fdf8b21d2 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs @@ -1273,7 +1273,7 @@ namespace System.Reflection Justification = "Module.ResolveMethod and Module.ResolveType are marked as RequiresUnreferencedCode because they rely on tokens" + "which are not guaranteed to be stable across trimming. So if somebody hardcodes a token it could break." + "The usage here is not like that as all these tokens come from existing metadata loaded from some IL" + - "and so trimming has no effect (the tokens are read AFTER trimming occured).")] + "and so trimming has no effect (the tokens are read AFTER trimming occurred).")] private static bool FilterCustomAttributeRecord( MetadataToken caCtorToken, in MetadataImport scope, @@ -1427,7 +1427,7 @@ namespace System.Reflection Justification = "Module.ResolveType is marked as RequiresUnreferencedCode because it relies on tokens" + "which are not guaranteed to be stable across trimming. So if somebody hardcodes a token it could break." + "The usage here is not like that as all these tokens come from existing metadata loaded from some IL" + - "and so trimming has no effect (the tokens are read AFTER trimming occured).")] + "and so trimming has no effect (the tokens are read AFTER trimming occurred).")] internal static AttributeUsageAttribute GetAttributeUsage(RuntimeType decoratedAttribute) { RuntimeModule decoratedModule = decoratedAttribute.GetRuntimeModule(); diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeExceptionHandlingClause.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeExceptionHandlingClause.cs index fe3f22e1d94..5962c223f37 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeExceptionHandlingClause.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeExceptionHandlingClause.cs @@ -43,7 +43,7 @@ namespace System.Reflection Justification = "Module.ResolveType is marked as RequiresUnreferencedCode because it relies on tokens" + "which are not guaranteed to be stable across trimming. So if somebody hardcodes a token it could break." + "The usage here is not like that as all these tokens come from existing metadata loaded from some IL" + - "and so trimming has no effect (the tokens are read AFTER trimming occured).")] + "and so trimming has no effect (the tokens are read AFTER trimming occurred).")] get { if (_flags != ExceptionHandlingClauseOptions.Clause) diff --git a/src/coreclr/System.Private.CoreLib/src/System/Threading/Interlocked.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Threading/Interlocked.CoreCLR.cs index 716c9c2a709..f45030a50d2 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Threading/Interlocked.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Threading/Interlocked.CoreCLR.cs @@ -150,7 +150,7 @@ namespace System.Threading public static extern object? CompareExchange(ref object? location1, object? value, object? comparand); // Note that getILIntrinsicImplementationForInterlocked() in vm\jitinterface.cpp replaces - // the body of the following method with the the following IL: + // the body of the following method with the following IL: // ldarg.0 // ldarg.1 // ldarg.2 diff --git a/src/coreclr/debug/createdump/dumpwriterelf.cpp b/src/coreclr/debug/createdump/dumpwriterelf.cpp index fb4d822c186..5e6e2497d18 100644 --- a/src/coreclr/debug/createdump/dumpwriterelf.cpp +++ b/src/coreclr/debug/createdump/dumpwriterelf.cpp @@ -80,7 +80,7 @@ DumpWriter::WriteDump() shdr.sh_size = 1; offset += sizeof(Shdr); - // When section header offset is present but ehdr section num = 0 then is is expected that + // When section header offset is present but ehdr section num = 0 then it is expected that // the sh_size indicates the size of the section array or 1 in our case. if (!WriteData(&shdr, sizeof(shdr))) { return false; diff --git a/src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp b/src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp index b8a84043b39..f0b864a86c0 100644 --- a/src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp +++ b/src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp @@ -121,7 +121,7 @@ void DacDbiInterfaceImpl::CreateStackWalk(VMPTR_Thread vmThread, // allocate memory for various stackwalker buffers (StackFrameIterator, RegDisplay, Context) AllocateStackwalk(ppSFIHandle, pThread, NULL, dwFlags); - // initialize the the CONTEXT. + // initialize the CONTEXT. // SetStackWalk will initial the RegDisplay from this context. GetContext(vmThread, pInternalContextBuffer); @@ -819,7 +819,7 @@ void DacDbiInterfaceImpl::InitFrameData(StackFrameIterator * pIter, // Here we detect (and set the appropriate flag) if the nativeOffset in the current frame points to the return address of IL_Throw() // (or other exception related JIT helpers like IL_Throw, IL_Rethrow, JIT_RngChkFail, IL_VerificationError, JIT_Overflow etc). // Since return addres point to the next(!) instruction after [call IL_Throw] this sometimes can lead to incorrect exception stacktraces - // where a next source line is spotted as an exception origin. This happends when the next instruction after [call IL_Throw] belongs to + // where a next source line is spotted as an exception origin. This happens when the next instruction after [call IL_Throw] belongs to // a sequence point and a source line different from a sequence point and a source line of [call IL_Throw]. // Later on this flag is used in order to adjust nativeOffset and make ICorDebugILFrame::GetIP return IL offset withing // the same sequence point as an actuall IL throw instruction. diff --git a/src/coreclr/debug/daccess/gcdump_dac.cpp b/src/coreclr/debug/daccess/gcdump_dac.cpp index 2f710a49c83..73fbb27227b 100644 --- a/src/coreclr/debug/daccess/gcdump_dac.cpp +++ b/src/coreclr/debug/daccess/gcdump_dac.cpp @@ -4,7 +4,7 @@ #include /* There is no DAC build of gcdump, so instead - * build it directly into the the dac. That's what all these ugly defines + * build it directly into the dac. That's what all these ugly defines * are all about. */ #ifdef __MSC_VER diff --git a/src/coreclr/debug/di/process.cpp b/src/coreclr/debug/di/process.cpp index 20cb8319bea..daa32a22a4a 100644 --- a/src/coreclr/debug/di/process.cpp +++ b/src/coreclr/debug/di/process.cpp @@ -12786,7 +12786,7 @@ void CordbProcess::HandleDebugEventForInteropDebugging(const DEBUG_EVENT * pEven } #endif - // This call will decide what to do w/ the the win32 event we just got. It does a lot of work. + // This call will decide what to do w/ the win32 event we just got. It does a lot of work. Reaction reaction = TriageWin32DebugEvent(pUnmanagedThread, pEvent); diff --git a/src/coreclr/debug/di/rsclass.cpp b/src/coreclr/debug/di/rsclass.cpp index 43bfa15923a..a928f8f00f4 100644 --- a/src/coreclr/debug/di/rsclass.cpp +++ b/src/coreclr/debug/di/rsclass.cpp @@ -618,7 +618,7 @@ HRESULT CordbClass::SetJMCStatus(BOOL fIsUserCode) } //----------------------------------------------------------------------------- -// We have to go the the EE to find out if a class is a value +// We have to go the EE to find out if a class is a value // class or not. This is because there is no flag for this, but rather // it depends on whether the class subclasses System.ValueType (apart // from System.Enum...). Replicating all that resoultion logic @@ -920,7 +920,7 @@ HRESULT FieldData::GetFieldSignature(CordbModule *pModule, // Initializes an instance of EnCHangingFieldInfo. // Arguments: // input: fStatic - flag to indicate whether the EnC field is static -// pObject - For instance fields, the Object instance containing the the sync-block. +// pObject - For instance fields, the Object instance containing the sync-block. // For static fields (if this is being called from GetStaticFieldValue) object is NULL. // fieldToken - token for the EnC field // metadataToken - metadata token for this instance of CordbClass @@ -974,7 +974,7 @@ void CordbClass::InitEnCFieldInfo(EnCHangingFieldInfo * pEncField, // Get information via the DAC about a field added with Edit and Continue. // Arguments: // input: fStatic - flag to indicate whether the EnC field is static -// pObject - For instance fields, the Object instance containing the the sync-block. +// pObject - For instance fields, the Object instance containing the sync-block. // For static fields (if this is being called from GetStaticFieldValue) object is NULL. // fieldToken - token for the EnC field // output: pointer to an initialized instance of FieldData that has been added to the appropriate table @@ -1029,7 +1029,7 @@ FieldData * CordbClass::GetEnCFieldFromDac(BOOL fStatic, // // Arguments: // input: fldToken - field of interest to get. -// pObject - For instance fields, the Object instance containing the the sync-block. +// pObject - For instance fields, the Object instance containing the sync-block. // For static fields (if this is being called from GetStaticFieldValue) object is NULL. // output: ppFieldData - the FieldData matching the fldToken. // diff --git a/src/coreclr/debug/di/rsenumerator.hpp b/src/coreclr/debug/di/rsenumerator.hpp index 569cf80289e..74a77132a5d 100644 --- a/src/coreclr/debug/di/rsenumerator.hpp +++ b/src/coreclr/debug/di/rsenumerator.hpp @@ -222,7 +222,7 @@ HRESULT CordbEnumeratorGetUnboxedObjectSize(&cbType)); #if defined(TARGET_X86) // STACK_GROWS_DOWN_ON_ARGS_WALK - // The the rpCur pointer starts off in the right spot for the + // The rpCur pointer starts off in the right spot for the // first argument, but thereafter we have to decrement it // before getting the variable's location from it. So increment // it here to be consistent later. diff --git a/src/coreclr/debug/di/rstype.cpp b/src/coreclr/debug/di/rstype.cpp index ace21deab50..ebe039cab80 100644 --- a/src/coreclr/debug/di/rstype.cpp +++ b/src/coreclr/debug/di/rstype.cpp @@ -2138,7 +2138,7 @@ static inline bool _IsNonGCRootHelper(CordbType * pType) //----------------------------------------------------------------------------- bool CordbType::IsGCRoot() { - // If it's a E_T_PTR type, then look at what it's a a pointer of. + // If it's a E_T_PTR type, then check its pointer type. CordbType * pPtr = this->GetPointerElementType(); if (pPtr == NULL) { diff --git a/src/coreclr/debug/di/shimprocess.cpp b/src/coreclr/debug/di/shimprocess.cpp index 5d579dc3208..21fe29b3aed 100644 --- a/src/coreclr/debug/di/shimprocess.cpp +++ b/src/coreclr/debug/di/shimprocess.cpp @@ -1602,7 +1602,7 @@ HMODULE ShimProcess::GetDacModule(PathString& dacModulePath) if (wszAccessDllPath.IsEmpty()) { // - // Load the access DLL from the same directory as the the current CLR Debugging Services DLL. + // Load the access DLL from the same directory as the current CLR Debugging Services DLL. // if (GetClrModuleDirectory(wszAccessDllPath) != S_OK) { diff --git a/src/coreclr/debug/ee/amd64/gen_amd64InstrDecode/README.md b/src/coreclr/debug/ee/amd64/gen_amd64InstrDecode/README.md index 9f83da3bcaa..f177ec3a695 100644 --- a/src/coreclr/debug/ee/amd64/gen_amd64InstrDecode/README.md +++ b/src/coreclr/debug/ee/amd64/gen_amd64InstrDecode/README.md @@ -150,7 +150,7 @@ gcc -g opcodes.cpp -o opcodes In investigating the various disassembly formats, the `intel` disassembly format is superior to the `att` format. This is because the -`intel` format clearly marks the the instruction relative accesses and +`intel` format clearly marks the instruction relative accesses and their sizes. For instance: - "BYTE PTR [rip+0x53525150]" diff --git a/src/coreclr/debug/ee/controller.cpp b/src/coreclr/debug/ee/controller.cpp index 783235efe05..05de07a9c91 100644 --- a/src/coreclr/debug/ee/controller.cpp +++ b/src/coreclr/debug/ee/controller.cpp @@ -4627,7 +4627,7 @@ void DebuggerPatchSkip::CopyInstructionBlock(BYTE *to, const BYTE* from) } PAL_EXCEPT_FILTER(FilterAccessViolation2) { - // The whole point is that if we copy up the the AV, then + // The whole point is that if we copy up the AV, then // that's enough to execute, otherwise we would not have been // able to execute the code anyway. So we just ignore the // exception. diff --git a/src/coreclr/debug/ee/controller.h b/src/coreclr/debug/ee/controller.h index 6996439c31f..af20de39a78 100644 --- a/src/coreclr/debug/ee/controller.h +++ b/src/coreclr/debug/ee/controller.h @@ -1926,7 +1926,7 @@ class DebuggerEnCBreakpoint : public DebuggerController { public: // We have two types of EnC breakpoints. The first is the one we - // sprinkle through old code to let us know when execution is occuring + // sprinkle through old code to let us know when execution is occurring // in a function that now has a new version. The second is when we've // actually resumed excecution into a remapped function and we need // to then notify the debugger. diff --git a/src/coreclr/debug/ee/debugger.cpp b/src/coreclr/debug/ee/debugger.cpp index 3ff2e66d1e5..8978967092d 100644 --- a/src/coreclr/debug/ee/debugger.cpp +++ b/src/coreclr/debug/ee/debugger.cpp @@ -5623,7 +5623,7 @@ void Debugger::TraceCall(const BYTE *code) EX_TRY { // Since we have a try catch and the debugger code can deal properly with - // faults occuring inside DebuggerController::DispatchTraceCall, we can safely + // faults occurring inside DebuggerController::DispatchTraceCall, we can safely // establish a FAULT_NOT_FATAL region. This is required since some callers can't // tolerate faults. FAULT_NOT_FATAL(); @@ -8935,7 +8935,7 @@ void Debugger::SendUserBreakpoint(Thread * thread) } else if (dbgAction == ATTACH_TERMINATE) { - // ATTACH_TERMINATE indicates the the user wants to terminate the app. + // ATTACH_TERMINATE indicates the user wants to terminate the app. LOG((LF_CORDB, LL_INFO10000, "D::SUB: terminating this process due to user request\n")); // Should this go through the host? @@ -13944,7 +13944,7 @@ DWORD Debugger::GetHelperThreadID(void ) // HRESULT Debugger::InsertToMethodInfoList(): Make sure -// that there's only one head of the the list of DebuggerMethodInfos +// that there's only one head of the list of DebuggerMethodInfos // for the (implicitly) given MethodDef/Module pair. HRESULT Debugger::InsertToMethodInfoList( DebuggerMethodInfo *dmi ) @@ -14132,7 +14132,7 @@ void Debugger::SendMDANotification( DebuggerIPCControlBlock *pDCB = m_pRCThread->GetDCB(); - // If the MDA is ocuring very early in startup before the DCB is setup, then bail. + // If the MDA is occurring very early in startup before the DCB is setup, then bail. if (pDCB == NULL) { return; @@ -14250,7 +14250,7 @@ void Debugger::SendLogMessage(int iLevel, LOG((LF_CORDB, LL_INFO10000, "D::SLM: Sending log message.\n")); // Send the message only if the debugger is attached to this appdomain. - // Note the the debugger may detach at any time, so we'll have to check + // Note the debugger may detach at any time, so we'll have to check // this again after we get the lock. AppDomain *pAppDomain = g_pEEInterface->GetThread()->GetDomain(); @@ -14401,7 +14401,7 @@ void Debugger::SendCustomDebuggerNotification(Thread * pThread, LOG((LF_CORDB, LL_INFO10000, "D::SLM: Sending log message.\n")); // Send the message only if the debugger is attached to this appdomain. - // Note the the debugger may detach at any time, so we'll have to check + // Note the debugger may detach at any time, so we'll have to check // this again after we get the lock. if (!CORDebuggerAttached()) { diff --git a/src/coreclr/debug/ee/debugger.h b/src/coreclr/debug/ee/debugger.h index c6a4bb2b440..a1f8f0b238e 100644 --- a/src/coreclr/debug/ee/debugger.h +++ b/src/coreclr/debug/ee/debugger.h @@ -629,7 +629,7 @@ protected: // The "debugger data lock" is a very small leaf lock used to protect debugger internal data structures (such // as DJIs, DMIs, module table). It is a GC-unsafe-anymode lock and so it can't trigger a GC while being held. // It also can't issue any callbacks into the EE or anycode that it does not directly control. - // This is a separate lock from the the larger Debugger-lock / Controller lock, which allows regions under those + // This is a separate lock from the larger Debugger-lock / Controller lock, which allows regions under those // locks to access debugger datastructures w/o blocking each other. Crst m_DebuggerDataLock; HANDLE m_CtrlCMutex; diff --git a/src/coreclr/debug/ee/funceval.cpp b/src/coreclr/debug/ee/funceval.cpp index de23343b797..c4c87251563 100644 --- a/src/coreclr/debug/ee/funceval.cpp +++ b/src/coreclr/debug/ee/funceval.cpp @@ -2168,7 +2168,7 @@ void GatherFuncEvalMethodInfo(DebuggerEval *pDE, // object ref as the stack. // // Note that we are passing ELEMENT_TYPE_END in the last parameter because we want to - // supress the the valid object ref check. + // supress the valid object ref check. // GetFuncEvalArgValue(pDE, &(argData[0]), diff --git a/src/coreclr/debug/ee/rcthread.cpp b/src/coreclr/debug/ee/rcthread.cpp index d6e2afe377f..f5621f4e1be 100644 --- a/src/coreclr/debug/ee/rcthread.cpp +++ b/src/coreclr/debug/ee/rcthread.cpp @@ -821,7 +821,7 @@ bool DebuggerRCThread::HandleRSEA() memcpy(e, GetIPCEventReceiveBuffer(), CorDBIPC_BUFFER_SIZE); #else // Be sure to fetch the event into the official receive buffer since some event handlers assume it's there - // regardless of the the event buffer pointer passed to them. + // regardless of the event buffer pointer passed to them. e = GetIPCEventReceiveBuffer(); g_pDbgTransport->GetNextEvent(e, CorDBIPC_BUFFER_SIZE); #endif // !FEATURE_DBGIPC_TRANSPOPRT diff --git a/src/coreclr/debug/inc/dacdbiinterface.h b/src/coreclr/debug/inc/dacdbiinterface.h index 82d5c4d1e46..2691dcf6853 100644 --- a/src/coreclr/debug/inc/dacdbiinterface.h +++ b/src/coreclr/debug/inc/dacdbiinterface.h @@ -1065,7 +1065,7 @@ public: virtual VMPTR_OBJECTHANDLE GetThreadObject(VMPTR_Thread vmThread) = 0; - + // // Get the allocation info corresponding to the specified thread. // @@ -2660,7 +2660,7 @@ public: HRESULT GetNativeCodeVersionNode(VMPTR_MethodDesc vmMethod, CORDB_ADDRESS codeStartAddress, OUT VMPTR_NativeCodeVersionNode* pVmNativeCodeVersionNode) = 0; // Retrieves the ILCodeVersionNode for a given NativeCodeVersionNode. - // This may return a NULL node if the native code belongs to the default IL version for this this method. + // This may return a NULL node if the native code belongs to the default IL version for this method. // // // Arguments: diff --git a/src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp b/src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp index 623f0087d40..b80859b2aec 100644 --- a/src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp +++ b/src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp @@ -1219,7 +1219,7 @@ lDone: ; } PAL_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - //dbprintf("Exception occured manipulating .res file %S\n", szResFileName); + //dbprintf("Exception occurred manipulating .res file %S\n", szResFileName); param.hr = HRESULT_FROM_WIN32(ERROR_RESOURCE_DATA_NOT_FOUND); } PAL_ENDTRY diff --git a/src/coreclr/gc/env/gcenv.os.h b/src/coreclr/gc/env/gcenv.os.h index beac5142c19..c37f62509e8 100644 --- a/src/coreclr/gc/env/gcenv.os.h +++ b/src/coreclr/gc/env/gcenv.os.h @@ -57,7 +57,7 @@ struct VirtualReserveFlags }; // An event is a synchronization object whose state can be set and reset -// indicating that an event has occured. It is used pervasively throughout +// indicating that an event has occurred. It is used pervasively throughout // the GC. // // Note that GCEvent deliberately leaks its contents by not having a non-trivial destructor. @@ -81,7 +81,7 @@ public: // is a logic error. void CloseEvent(); - // "Sets" the event, indicating that a particular event has occured. May + // "Sets" the event, indicating that a particular event has occurred. May // wake up other threads waiting on this event. Depending on whether or // not this event is an auto-reset event, the state of the event may // or may not be automatically reset after Set is called. diff --git a/src/coreclr/gc/env/volatile.h b/src/coreclr/gc/env/volatile.h index e3458d55b8b..65d8aa42bda 100644 --- a/src/coreclr/gc/env/volatile.h +++ b/src/coreclr/gc/env/volatile.h @@ -207,7 +207,7 @@ T VolatileLoad(Volatile const * pt) } // -// VolatileStore stores a T into the target of a pointer to T. Is is guaranteed that this store will +// VolatileStore stores a T into the target of a pointer to T. It is guaranteed that this store will // not be optimized away by the compiler, and that any operation that occurs before this store, in program // order, will not be moved after this store. In general, it is not guaranteed that the store will be // atomic, though this is the case for most aligned scalar data types. If you need atomic loads or stores, diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index e75c539000c..d2917436792 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -15041,7 +15041,7 @@ void allocator::copy_from_alloc_list (alloc_list* fromalist) if (repair_list) { - //repair the the list + //repair the list //new items may have been added during the plan phase //items may have been unlinked. uint8_t* free_item = alloc_list_head_of (i); diff --git a/src/coreclr/gc/gcinterface.dac.h b/src/coreclr/gc/gcinterface.dac.h index c7d72c7145b..11a1c85c5bf 100644 --- a/src/coreclr/gc/gcinterface.dac.h +++ b/src/coreclr/gc/gcinterface.dac.h @@ -123,7 +123,7 @@ enum failure_get_memory fgm_commit_table = 5 }; -// A record of the last OOM that occured in the GC, with some +// A record of the last OOM that occurred in the GC, with some // additional information as to what triggered the OOM. struct oom_history { diff --git a/src/coreclr/gc/gcinterface.h b/src/coreclr/gc/gcinterface.h index d7c08c44d9a..8b6bf765aaa 100644 --- a/src/coreclr/gc/gcinterface.h +++ b/src/coreclr/gc/gcinterface.h @@ -612,7 +612,7 @@ public: // Gets memory related information the last GC observed. Depending on the last arg, this could // be any last GC that got recorded, or of the kind specified by this arg. All info below is // what was observed by that last GC. - // + // // highMemLoadThreshold - physical memory load (in percentage) when GC will start to // react aggressively to reclaim memory. // totalPhysicalMem - the total amount of phyiscal memory available on the machine and the memory @@ -621,7 +621,7 @@ public: // lastRecordedHeapSizeBytes - total managed heap size. // lastRecordedFragmentation - total fragmentation in the managed heap. // totalCommittedBytes - total committed bytes by the managed heap. - // promotedBytes - promoted bytes. + // promotedBytes - promoted bytes. // pinnedObjectCount - # of pinned objects observed. // finalizationPendingCount - # of objects ready for finalization. // index - the index of the GC. @@ -741,8 +741,8 @@ public: // Returns whether or not a GC is in progress. virtual bool IsGCInProgressHelper(bool bConsiderGCStart = false) = 0; - // Returns the number of GCs that have occured. Mainly used for - // sanity checks asserting that a GC has not occured. + // Returns the number of GCs that have occurred. Mainly used for + // sanity checks asserting that a GC has not occurred. virtual unsigned GetGcCount() = 0; // Gets whether or not the home heap of this alloc context matches the heap @@ -785,11 +785,11 @@ public: ============================================================================ */ - // Get the timestamp corresponding to the last GC that occured for the + // Get the timestamp corresponding to the last GC that occurred for the // given generation. virtual size_t GetLastGCStartTime(int generation) = 0; - // Gets the duration of the last GC that occured for the given generation. + // Gets the duration of the last GC that occurred for the given generation. virtual size_t GetLastGCDuration(int generation) = 0; // Gets a timestamp for the current moment in time. diff --git a/src/coreclr/ilasm/assembler.cpp b/src/coreclr/ilasm/assembler.cpp index 297862bbecb..505af0e10b0 100644 --- a/src/coreclr/ilasm/assembler.cpp +++ b/src/coreclr/ilasm/assembler.cpp @@ -992,7 +992,7 @@ BOOL Assembler::EmitField(FieldDescriptor* pFD) } } //-------------------------------------------------------------------------------- - // Set the the RVA to a dummy value. later it will be fixed + // Set the RVA to a dummy value. later it will be fixed // up to be something correct, but if we don't emit something // the size of the meta-data will not be correct if (pFD->m_rvaLabel) diff --git a/src/coreclr/inc/clrhost.h b/src/coreclr/inc/clrhost.h index f70382cf17d..08721c3b5e0 100644 --- a/src/coreclr/inc/clrhost.h +++ b/src/coreclr/inc/clrhost.h @@ -69,7 +69,7 @@ HANDLE ClrGetProcessExecutableHeap(); extern int RFS_HashStack(); #endif -// Critical section support for CLR DLLs other than the the EE. +// Critical section support for CLR DLLs other than the EE. // Include the header defining each Crst type and its corresponding level (relative rank). This is // auto-generated from a tool that takes a high-level description of each Crst type and its dependencies. #include "crsttypes.h" diff --git a/src/coreclr/inc/cordebug.idl b/src/coreclr/inc/cordebug.idl index 785a00d5bda..adac762ccbb 100644 --- a/src/coreclr/inc/cordebug.idl +++ b/src/coreclr/inc/cordebug.idl @@ -2364,7 +2364,7 @@ interface ICorDebugAppDomain4 : IUnknown /* ------------------------------------------------------------------------- * * Assembly interface - * An ICorDebugAssembly instance corresponds to a a managed assembly loaded + * An ICorDebugAssembly instance corresponds to a managed assembly loaded * into a specific AppDomain in the CLR. For assemblies shared between multiple * AppDomains (eg. CoreLib), there will be a separate ICorDebugAssembly instance * per AppDomain in which it is used. @@ -6637,7 +6637,7 @@ interface ICorDebugObjectValue : ICorDebugValue HRESULT GetContext([out] ICorDebugContext **ppContext); /* - * IsValueClass returns true if the the class of this object is + * IsValueClass returns true if the class of this object is * a value class. */ diff --git a/src/coreclr/inc/corerror.xml b/src/coreclr/inc/corerror.xml index 34a6b1d4b9a..4841b309746 100644 --- a/src/coreclr/inc/corerror.xml +++ b/src/coreclr/inc/corerror.xml @@ -872,7 +872,7 @@ CORDBG_E_ENC_HANGING_FIELD "The field was added via Edit and Continue after the class was loaded." - The field was added via EnC after the class was loaded, and so instead of the the field being contiguous with the other fields, it's 'hanging' off the instance or type. This error is used to indicate that either the storage for this field is not yet available and so the field value cannot be read, or the debugger needs to use an EnC specific code path to get the value. + The field was added via EnC after the class was loaded, and so instead of the field being contiguous with the other fields, it's 'hanging' off the instance or type. This error is used to indicate that either the storage for this field is not yet available and so the field value cannot be read, or the debugger needs to use an EnC specific code path to get the value. diff --git a/src/coreclr/inc/corprof.idl b/src/coreclr/inc/corprof.idl index 16e75b83b4d..80985fcb2d8 100644 --- a/src/coreclr/inc/corprof.idl +++ b/src/coreclr/inc/corprof.idl @@ -1353,7 +1353,7 @@ interface ICorProfilerCallback : IUnknown /* * The CLR calls RemotingClientSendingMessage to notify the profiler that - * a remoting call is requiring the the caller to send an invocation request through + * a remoting call is requiring the caller to send an invocation request through * a remoting channel. * * pCookie - if remoting GUID cookies are active, this value will correspond with the @@ -2507,7 +2507,7 @@ interface ICorProfilerCallback7 : ICorProfilerCallback6 // in-memory module is updated. Even when symbols are provided up-front in // a call to the managed API Assembly.Load(byte[], byte[], ...) the runtime // may not actually associate the symbolic data with the module until after - // the ModuleLoadFinished callback has occured. This event provides a later + // the ModuleLoadFinished callback has occurred. This event provides a later // opportunity to collect symbols for such modules. // // This event is controlled by the COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED @@ -4080,7 +4080,7 @@ interface ICorProfilerInfo9 : ICorProfilerInfo8 //Given the native code start address, return the native->IL mapping information for this jitted version of the code HRESULT GetILToNativeMapping3(UINT_PTR pNativeCodeStartAddress, ULONG32 cMap, ULONG32 *pcMap, COR_DEBUG_IL_TO_NATIVE_MAP map[]); - //Given the native code start address, return the the blocks of virtual memory that store this code (method code is not necessarily stored in a single contiguous memory region) + //Given the native code start address, return the blocks of virtual memory that store this code (method code is not necessarily stored in a single contiguous memory region) HRESULT GetCodeInfo4(UINT_PTR pNativeCodeStartAddress, ULONG32 cCodeInfos, ULONG32* pcCodeInfos, COR_PRF_CODE_INFO codeInfos[]); }; diff --git a/src/coreclr/inc/daccess.h b/src/coreclr/inc/daccess.h index 5ad8b99b67b..335d254c483 100644 --- a/src/coreclr/inc/daccess.h +++ b/src/coreclr/inc/daccess.h @@ -1611,7 +1611,7 @@ public: return DacGlobalBase() + *m_rvaPtr; } - // This is only testing the the pointer memory is available but does not verify + // This is only testing the pointer memory is available but does not verify // the memory that it points to. // bool IsValidPtr(void) const diff --git a/src/coreclr/inc/regex_base.h b/src/coreclr/inc/regex_base.h index 3afa5398be2..fd6103f5da4 100644 --- a/src/coreclr/inc/regex_base.h +++ b/src/coreclr/inc/regex_base.h @@ -570,7 +570,7 @@ public: // (NOTE: RegexIterator and InputIterator are often typedef'ed to be the same thing.) // 3. "Item" typedef. // This will be used with methods GetItem and MatchItem (see below). Item must -// define the the following methods: +// define the following methods: // ItemType GetType() : returns the type of the item. See below for explanation of ItemType // const RegexIterator& GetNext() : iterator pointing to the start of the next item. // 4. "MatchFlags" typedef, and "static const DefaultMatchFlags" value. diff --git a/src/coreclr/inc/safewrap.h b/src/coreclr/inc/safewrap.h index 85377d31e4b..c7d5386d430 100644 --- a/src/coreclr/inc/safewrap.h +++ b/src/coreclr/inc/safewrap.h @@ -34,7 +34,7 @@ consistency's sake. - DON'T FORGET CONTRACTS: Most of these APIs will likely be Throws/GC_Notrigger. Also use PRECONDITIONs + POSTCONDITIONS when possible. -- SIGNATURES: Keep the method signture as close the the original win32 API as possible. +- SIGNATURES: Keep the method signture as close the original win32 API as possible. - Preserve the return type + value. (except allow it to throw on oom). If the return value should be a holder, then use that as an out-parameter at the end of the argument list. We don't want to return holders because that will cause the dtors to be called. diff --git a/src/coreclr/inc/sstring.h b/src/coreclr/inc/sstring.h index c2c3b9c7d21..bedf866c8c5 100644 --- a/src/coreclr/inc/sstring.h +++ b/src/coreclr/inc/sstring.h @@ -192,7 +192,7 @@ private: // Set this string to the UTF8 character void SetUTF8(CHAR character); - // This this string to the given literal. We share the mem and don't make a copy. + // Set this string to the given literal. We share the mem and don't make a copy. void SetLiteral(const CHAR *literal); void SetLiteral(const WCHAR *literal); diff --git a/src/coreclr/inc/utilcode.h b/src/coreclr/inc/utilcode.h index 77fe9e6d786..1c8a16ec900 100644 --- a/src/coreclr/inc/utilcode.h +++ b/src/coreclr/inc/utilcode.h @@ -3952,7 +3952,7 @@ LPWSTR *SegmentCommandLine(LPCWSTR lpCmdLine, DWORD *pNumArgs); // // These accessors serve the purpose of retrieving information from the // TEB in a manner that ensures that the current fiber will not switch -// threads while the access is occuring. +// threads while the access is occurring. // class ClrTeb { diff --git a/src/coreclr/inc/volatile.h b/src/coreclr/inc/volatile.h index 8df894ee2df..a1a45d0995e 100644 --- a/src/coreclr/inc/volatile.h +++ b/src/coreclr/inc/volatile.h @@ -217,7 +217,7 @@ T VolatileLoad(Volatile const * pt) } // -// VolatileStore stores a T into the target of a pointer to T. Is is guaranteed that this store will +// VolatileStore stores a T into the target of a pointer to T. It is guaranteed that this store will // not be optimized away by the compiler, and that any operation that occurs before this store, in program // order, will not be moved after this store. In general, it is not guaranteed that the store will be // atomic, though this is the case for most aligned scalar data types. If you need atomic loads or stores, diff --git a/src/coreclr/jit/block.h b/src/coreclr/jit/block.h index 092bad7367e..88dcb79794f 100644 --- a/src/coreclr/jit/block.h +++ b/src/coreclr/jit/block.h @@ -197,7 +197,7 @@ struct allMemoryKinds // BB2 of the corresponding handler to be an "EH successor" of BB1. Because we // make the conservative assumption that control flow can jump from a try block // to its handler at any time, the immediate (regular control flow) -// predecessor(s) of the the first block of a try block are also considered to +// predecessor(s) of the first block of a try block are also considered to // have the first block of the handler as an EH successor. This makes variables that // are "live-in" to the handler become "live-out" for these try-predecessor block, // so that they become live-in to the try -- which we require. diff --git a/src/coreclr/jit/codegenarm64.cpp b/src/coreclr/jit/codegenarm64.cpp index eb730de196a..5c1f8c64f15 100644 --- a/src/coreclr/jit/codegenarm64.cpp +++ b/src/coreclr/jit/codegenarm64.cpp @@ -854,7 +854,7 @@ void CodeGen::genSaveCalleeSavedRegisterGroup(regMaskTP regsMask, int spDelta, i // to high addresses. This means that integer registers are saved at lower addresses than floatint-point/SIMD // registers. However, when genSaveFpLrWithAllCalleeSavedRegisters is true, the integer registers are stored // at higher addresses than floating-point/SIMD registers, that is, the relative order of these two classes -// is reveresed. This is done to put the saved frame pointer very high in the frame, for simplicity. +// is reversed. This is done to put the saved frame pointer very high in the frame, for simplicity. // // TODO: We could always put integer registers at the higher addresses, if desired, to remove this special // case. It would cause many asm diffs when first implemented. diff --git a/src/coreclr/jit/codegenarmarch.cpp b/src/coreclr/jit/codegenarmarch.cpp index f21adf86230..4905aba6e43 100644 --- a/src/coreclr/jit/codegenarmarch.cpp +++ b/src/coreclr/jit/codegenarmarch.cpp @@ -974,7 +974,7 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode) } // If we have an HFA we can't have any GC pointers, - // if not then the max size for the the struct is 16 bytes + // if not then the max size for the struct is 16 bytes if (isHfa) { noway_assert(!layout->HasGCPtr()); diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index daf4749d34d..6fc7d4e1d1a 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -3006,7 +3006,7 @@ void CodeGen::genFnPrologCalleeRegArgs(regNumber xtraReg, bool* pXtraRegClobbere // When we have a promoted struct we have two possible LclVars that can represent the incoming argument // in the regArgTab[], either the original TYP_STRUCT argument or the introduced lvStructField. // We will use the lvStructField if we have a TYPE_INDEPENDENT promoted struct field otherwise - // use the the original TYP_STRUCT argument. + // use the original TYP_STRUCT argument. // if (varDsc->lvPromoted || varDsc->lvIsStructField) { @@ -6658,7 +6658,7 @@ unsigned Compiler::GetHfaCount(CORINFO_CLASS_HANDLE hClass) // // Note: // On x64 Windows the caller always creates slots (homing space) in its frame for the -// first 4 arguments of a callee (register passed args). So, the the variable number +// first 4 arguments of a callee (register passed args). So, the variable number // (lclNum) for the first argument with a stack slot is always 0. // For System V systems or armarch, there is no such calling convention requirement, and the code // needs to find the first stack passed argument from the caller. This is done by iterating over @@ -8569,7 +8569,7 @@ void CodeGenInterface::VariableLiveKeeper::VariableLiveRange::dumpVariableLiveRa // LiveRangeDumper //------------------------------------------------------------------------ //------------------------------------------------------------------------ -// resetDumper: If the the "liveRange" has its last "VariableLiveRange" closed, it makes +// resetDumper: If the "liveRange" has its last "VariableLiveRange" closed, it makes // the "LiveRangeDumper" points to end of "liveRange" (nullptr). In other case, // it makes the "LiveRangeDumper" points to the last "VariableLiveRange" of // "liveRange", which is opened. diff --git a/src/coreclr/jit/codegenloongarch64.cpp b/src/coreclr/jit/codegenloongarch64.cpp index 5e37732fb65..474d109f724 100644 --- a/src/coreclr/jit/codegenloongarch64.cpp +++ b/src/coreclr/jit/codegenloongarch64.cpp @@ -566,7 +566,7 @@ void CodeGen::genSaveCalleeSavedRegisterGroup(regMaskTP regsMask, int spDelta, i // The caller can tell us to fold in a stack pointer adjustment, which we will do with the first instruction. // Note that the stack pointer adjustment must be by a multiple of 16 to preserve the invariant that the // stack pointer is always 16 byte aligned. If we are saving an odd number of callee-saved -// registers, though, we will have an empty aligment slot somewhere. It turns out we will put +// registers, though, we will have an empty alignment slot somewhere. It turns out we will put // it below (at a lower address) the callee-saved registers, as that is currently how we // do frame layout. This means that the first stack offset will be 8 and the stack pointer // adjustment must be done by a SUB, and not folded in to a pre-indexed store. @@ -9049,7 +9049,7 @@ void CodeGen::genFnPrologCalleeRegArgs() // When we have a promoted struct we have two possible LclVars that can represent the incoming argument // in the regArgTab[], either the original TYP_STRUCT argument or the introduced lvStructField. // We will use the lvStructField if we have a TYPE_INDEPENDENT promoted struct field otherwise - // use the the original TYP_STRUCT argument. + // use the original TYP_STRUCT argument. // if (varDsc->lvPromoted || varDsc->lvIsStructField) { diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index 5a7d09afdb5..9584af664cf 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -457,7 +457,7 @@ bool Compiler::isNativePrimitiveStructType(CORINFO_CLASS_HANDLE clsHnd) //----------------------------------------------------------------------------- // getPrimitiveTypeForStruct: -// Get the "primitive" type that is is used for a struct +// Get the "primitive" type that is used for a struct // of size 'structSize'. // We examine 'clsHnd' to check the GC layout of the struct and // return TYP_REF for structs that simply wrap an object. @@ -5979,7 +5979,7 @@ void Compiler::compCompileFinish() if ((info.compILCodeSize <= 32) && // Is it a reasonably small method? (info.compNativeCodeSize < 512) && // Some trivial methods generate huge native code. eg. pushing a single huge // struct - (impInlinedCodeSize <= 128) && // Is the the inlining reasonably bounded? + (impInlinedCodeSize <= 128) && // Is the inlining reasonably bounded? // Small methods cannot meaningfully have a big number of locals // or arguments. We always track arguments at the start of // the prolog which requires memory diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 6e6e170d7ca..a2054f77e68 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -1845,7 +1845,7 @@ public: bool verboseSsa; // If true, produce especially verbose dump output in SSA construction. bool shouldUseVerboseSsa(); bool treesBeforeAfterMorph; // If true, print trees before/after morphing (paired by an intra-compilation id: - int morphNum; // This counts the the trees that have been morphed, allowing us to label each uniquely. + int morphNum; // This counts the trees that have been morphed, allowing us to label each uniquely. bool doExtraSuperPmiQueries; void makeExtraStructQueries(CORINFO_CLASS_HANDLE structHandle, int level); // Make queries recursively 'level' deep. @@ -3071,7 +3071,7 @@ public: #ifdef JIT32_GCENCODER - unsigned lvaLocAllocSPvar; // variable which stores the value of ESP after the the last alloca/localloc + unsigned lvaLocAllocSPvar; // variable which stores the value of ESP after the last alloca/localloc #endif // JIT32_GCENCODER @@ -4899,7 +4899,7 @@ public: SPK_ByReference }; // The struct is passed/returned by reference to a copy/buffer. - // Get the "primitive" type that is is used when we are given a struct of size 'structSize'. + // Get the "primitive" type that is used when we are given a struct of size 'structSize'. // For pointer sized structs the 'clsHnd' is used to determine if the struct contains GC ref. // A "primitive" type is one of the scalar types: byte, short, int, long, ref, float, double // If we can't or shouldn't use a "primitive" type then TYP_UNKNOWN is returned. @@ -8489,10 +8489,10 @@ private: return sizeBytes; } - // Get the the number of elements of baseType of SIMD vector given by its size and baseType + // Get the number of elements of baseType of SIMD vector given by its size and baseType static int getSIMDVectorLength(unsigned simdSize, var_types baseType); - // Get the the number of elements of baseType of SIMD vector given by its type handle + // Get the number of elements of baseType of SIMD vector given by its type handle int getSIMDVectorLength(CORINFO_CLASS_HANDLE typeHnd); // Get preferred alignment of SIMD type. @@ -10430,7 +10430,7 @@ public: // "op1" or its components is augmented by appending "fieldSeq". In practice, if "op1" is a GT_LCL_FLD, it has // a field sequence as a member; otherwise, it may be the addition of an a byref and a constant, where the const // has a field sequence -- in this case "fieldSeq" is appended to that of the constant; otherwise, we - // record the the field sequence using the ZeroOffsetFieldMap described above. + // record the field sequence using the ZeroOffsetFieldMap described above. // // One exception above is that "op1" is a node of type "TYP_REF" where "op1" is a GT_LCL_VAR. // This happens when System.Object vtable pointer is a regular field at offset 0 in System.Private.CoreLib in diff --git a/src/coreclr/jit/ee_il_dll.cpp b/src/coreclr/jit/ee_il_dll.cpp index 4f0556f1b8e..ba822b63527 100644 --- a/src/coreclr/jit/ee_il_dll.cpp +++ b/src/coreclr/jit/ee_il_dll.cpp @@ -781,7 +781,7 @@ void Compiler::eeGetVars() /* If extendOthers is set, then assume the scope of unreported vars is the entire method. Note that this will cause fgExtendDbgLifetimes() - to zero-initalize all of them. This will be expensive if it's used + to zero-initialize all of them. This will be expensive if it's used for too many variables. */ if (extendOthers) diff --git a/src/coreclr/jit/emit.cpp b/src/coreclr/jit/emit.cpp index 0b8013a693a..a337b0a77f4 100644 --- a/src/coreclr/jit/emit.cpp +++ b/src/coreclr/jit/emit.cpp @@ -3272,7 +3272,7 @@ emitter::instrDesc* emitter::emitNewInstrCallInd(int argCnt, assert(id->idAddr()->iiaAddrMode.amDisp == disp); #endif // TARGET_XARCH - /* Save the the live GC registers in the unused register fields */ + /* Save the live GC registers in the unused register fields */ emitEncodeCallGCregs(gcrefRegs, id); return id; @@ -3344,7 +3344,7 @@ emitter::instrDesc* emitter::emitNewInstrCallDir(int argCnt, /* Make sure we didn't waste space unexpectedly */ assert(!id->idIsLargeCns()); - /* Save the the live GC registers in the unused register fields */ + /* Save the live GC registers in the unused register fields */ emitEncodeCallGCregs(gcrefRegs, id); return id; diff --git a/src/coreclr/jit/emit.h b/src/coreclr/jit/emit.h index a19b912b3e1..777cfdf18b9 100644 --- a/src/coreclr/jit/emit.h +++ b/src/coreclr/jit/emit.h @@ -270,7 +270,7 @@ struct insGroup #define IGF_FUNCLET_PROLOG 0x0008 // this group belongs to a funclet prolog #define IGF_FUNCLET_EPILOG 0x0010 // this group belongs to a funclet epilog. #define IGF_EPILOG 0x0020 // this group belongs to a main function epilog -#define IGF_NOGCINTERRUPT 0x0040 // this IG is is a no-interrupt region (prolog, epilog, etc.) +#define IGF_NOGCINTERRUPT 0x0040 // this IG is in a no-interrupt region (prolog, epilog, etc.) #define IGF_UPD_ISZ 0x0080 // some instruction sizes updated #define IGF_PLACEHOLDER 0x0100 // this is a placeholder group, to be filled in later #define IGF_EXTEND 0x0200 // this block is conceptually an extension of the previous block @@ -2135,7 +2135,7 @@ private: #endif // Terminates any in-progress instruction group, making the current IG a new empty one. - // Mark this instruction group as having a label; return the the new instruction group. + // Mark this instruction group as having a label; return the new instruction group. // Sets the emitter's record of the currently live GC variables // and registers. The "isFinallyTarget" parameter indicates that the current location is // the start of a basic block that is returned to after a finally clause in non-exceptional execution. diff --git a/src/coreclr/jit/emitxarch.cpp b/src/coreclr/jit/emitxarch.cpp index ca78ac9e94d..d57af3fc08a 100644 --- a/src/coreclr/jit/emitxarch.cpp +++ b/src/coreclr/jit/emitxarch.cpp @@ -1967,7 +1967,7 @@ inline emitter::code_t emitter::insEncodeRRIb(instruction ins, regNumber reg, em /***************************************************************************** * - * Returns the "+reg" opcode with the the given register set into the low + * Returns the "+reg" opcode with the given register set into the low * nibble of the opcode */ @@ -3499,7 +3499,7 @@ regNumber emitter::emitInsBinary(instruction ins, emitAttr attr, GenTree* dst, G // * Local variable // // Most of these types (except Indirect: Class variable and Indirect: Addressing mode) - // give us a a local variable number and an offset and access memory on the stack + // give us a local variable number and an offset and access memory on the stack // // Indirect: Class variable is used for access static class variables and gives us a handle // to the memory location we read from diff --git a/src/coreclr/jit/emitxarch.h b/src/coreclr/jit/emitxarch.h index 2f912ea8cbd..3f1efdaac5e 100644 --- a/src/coreclr/jit/emitxarch.h +++ b/src/coreclr/jit/emitxarch.h @@ -549,7 +549,7 @@ void emitIns_Call(EmitCallType callType, // Is the last instruction emitted a call instruction? bool emitIsLastInsCall(); -// Insert a NOP at the end of the the current instruction group if the last emitted instruction was a 'call', +// Insert a NOP at the end of the current instruction group if the last emitted instruction was a 'call', // because the next instruction group will be an epilog. void emitOutputPreEpilogNOP(); #endif // TARGET_AMD64 diff --git a/src/coreclr/jit/fgbasic.cpp b/src/coreclr/jit/fgbasic.cpp index 1d92e4d9d50..eff18c5bea0 100644 --- a/src/coreclr/jit/fgbasic.cpp +++ b/src/coreclr/jit/fgbasic.cpp @@ -5457,7 +5457,7 @@ BasicBlock* Compiler::fgRelocateEHRange(unsigned regionIndex, FG_RELOCATE_TYPE r // 4. A and X share the 'last' block. There are two sub-cases: // (a) A is a larger range than X (such that the beginning of A precedes the // beginning of X): in this case, we are moving the tail of A. We set the - // 'last' block of A to the the block preceding the beginning block of X. + // 'last' block of A to the block preceding the beginning block of X. // (b) A is a smaller range than X. Thus, we are moving the entirety of A along // with X. In this case, nothing in the EH record for A needs to change. // 5. A and X share the 'beginning' block (but aren't the same range, as in #3). diff --git a/src/coreclr/jit/fgehopt.cpp b/src/coreclr/jit/fgehopt.cpp index cbf683a4390..cbd65bc1e3b 100644 --- a/src/coreclr/jit/fgehopt.cpp +++ b/src/coreclr/jit/fgehopt.cpp @@ -1022,7 +1022,7 @@ PhaseStatus Compiler::fgCloneFinally() // try { } catch { } finally { } // // will have two call finally blocks, one for the normal exit - // from the try, and the the other for the exit from the + // from the try, and the other for the exit from the // catch. They'll both pass the same return point which is the // statement after the finally, so they can share the clone. // diff --git a/src/coreclr/jit/fgopt.cpp b/src/coreclr/jit/fgopt.cpp index 86a9b540ded..001bd0130c3 100644 --- a/src/coreclr/jit/fgopt.cpp +++ b/src/coreclr/jit/fgopt.cpp @@ -5182,7 +5182,7 @@ bool Compiler::fgReorderBlocks() } // Set connected_bDest to true if moving blocks [bStart .. bEnd] - // connects with the the jump dest of bPrev (i.e bDest) and + // connects with the jump dest of bPrev (i.e bDest) and // thus allows bPrev fall through instead of jump. if (bNext == bDest) { @@ -6010,7 +6010,7 @@ bool Compiler::fgUpdateFlowGraph(bool doTailDuplication) // if (fgIsUsingProfileWeights()) { - // if block and bdest are in different hot/cold regions we can't do this this optimization + // if block and bdest are in different hot/cold regions we can't do this optimization // because we can't allow fall-through into the cold region. if (!fgEdgeWeightsComputed || fgInDifferentRegions(block, bDest)) { diff --git a/src/coreclr/jit/fgprofile.cpp b/src/coreclr/jit/fgprofile.cpp index 59ddfd2ecc5..f5c8093503e 100644 --- a/src/coreclr/jit/fgprofile.cpp +++ b/src/coreclr/jit/fgprofile.cpp @@ -1305,7 +1305,7 @@ void EfficientEdgeCountInstrumentor::BuildSchemaElements(BasicBlock* block, Sche assert(probe->schemaIndex == -1); probe->schemaIndex = (int)schema.size(); - // Normally we use the the offset of the block in the schema, but for certain + // Normally we use the offset of the block in the schema, but for certain // blocks we do not have any information we can use and need to use internal BB numbers. // int32_t sourceKey = EfficientEdgeCountBlockToKey(block); diff --git a/src/coreclr/jit/gcencode.cpp b/src/coreclr/jit/gcencode.cpp index 216195a3506..0f488747819 100644 --- a/src/coreclr/jit/gcencode.cpp +++ b/src/coreclr/jit/gcencode.cpp @@ -2071,7 +2071,7 @@ unsigned PendingArgsStack::pasEnumGCoffsCount() } //----------------------------------------------------------------------------- -// Initalize enumeration by passing in iter=pasENUM_START. +// Initialize enumeration by passing in iter=pasENUM_START. // Continue by passing in the return value as the new value of iter // End of enumeration when pasENUM_END is returned // If return value != pasENUM_END, *offs is set to the offset for GCinfo @@ -4124,7 +4124,7 @@ void GCInfo::gcMakeRegPtrTable( // Do we have an argument or local variable? if (!varDsc->lvIsParam) { - // If is is pinned, it must be an untracked local. + // If it is pinned, it must be an untracked local. assert(!varDsc->lvPinned || !varDsc->lvTracked); if (varDsc->lvTracked || !varDsc->lvOnFrame) diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 39354ac63dc..a2dd7559fa6 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -11342,7 +11342,7 @@ void Compiler::gtDispTree(GenTree* tree, if (IsUninitialized(tree)) { - /* Value used to initalize nodes */ + /* Value used to initialize nodes */ printf("Uninitialized tree node!\n"); return; } @@ -12492,7 +12492,7 @@ GenTree* Compiler::gtFoldExprCall(GenTreeCall* call) // An alternative tree if folding happens. // // Notes: -// If either operand is known to be a a RuntimeType, then the type +// If either operand is known to be a RuntimeType, then the type // equality methods will simply check object identity and so we can // fold the call into a simple compare of the call's operands. @@ -13430,7 +13430,7 @@ GenTree* Compiler::gtFoldBoxNullable(GenTree* tree) // This can be useful when the only part of the box that is "live" // is its type. // -// If removal fails, is is possible that a subsequent pass may be +// If removal fails, it is possible that a subsequent pass may be // able to optimize. Blocking side effects may now be minimized // (null or bounds checks might have been removed) or might be // better known (inline return placeholder updated with the actual diff --git a/src/coreclr/jit/gentree.h b/src/coreclr/jit/gentree.h index 069975840e5..caf7ca1823e 100644 --- a/src/coreclr/jit/gentree.h +++ b/src/coreclr/jit/gentree.h @@ -8046,7 +8046,7 @@ inline bool GenTree::IsIntegralConst(ssize_t constVal) const } //------------------------------------------------------------------- -// IsIntegralConstVector: returns true if this this is a SIMD vector +// IsIntegralConstVector: returns true if this is an SIMD vector // with all its elements equal to an integral constant. // // Arguments: @@ -8105,8 +8105,8 @@ inline bool GenTree::IsIntegralConstVector(ssize_t constVal) const } //------------------------------------------------------------------- -// IsSIMDZero: returns true if this this is a SIMD vector -// with all its elements equal to zero. +// IsSIMDZero: returns true if this is an SIMD vector with all its +// elements equal to zero. // // Returns: // True if this represents an integral const SIMD vector. diff --git a/src/coreclr/jit/hashbv.cpp b/src/coreclr/jit/hashbv.cpp index 34798eaa645..f24b0e402c3 100644 --- a/src/coreclr/jit/hashbv.cpp +++ b/src/coreclr/jit/hashbv.cpp @@ -1684,7 +1684,7 @@ void hashBv::InorderTraverse(nodeAction n) { // keep an array of the current pointers - // into each of the the bitvector lists + // into each of the bitvector lists // in the hashtable for (int i = 0; i < hts; i++) { diff --git a/src/coreclr/jit/hwintrinsic.cpp b/src/coreclr/jit/hwintrinsic.cpp index 9ca29d7969b..7c333303e48 100644 --- a/src/coreclr/jit/hwintrinsic.cpp +++ b/src/coreclr/jit/hwintrinsic.cpp @@ -430,7 +430,7 @@ bool HWIntrinsicInfo::isImmOp(NamedIntrinsic id, const GenTree* op) // argType -- the required type of argument // argClass -- the class handle of argType // expectAddr -- if true indicates we are expecting type stack entry to be a TYP_BYREF. -// newobjThis -- For CEE_NEWOBJ, this is the temp grabbed for the allocated uninitalized object. +// newobjThis -- For CEE_NEWOBJ, this is the temp grabbed for the allocated uninitialized object. // // Return Value: // the validated argument diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index ebe180820d7..ac9cf93198a 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -8636,7 +8636,7 @@ bool Compiler::impIsImplicitTailCallCandidate( // opcode - opcode that inspires the call // pResolvedToken - resolved token for the call target // pConstrainedResolvedToken - resolved constraint token (or nullptr) -// newObjThis - tree for this pointer or uninitalized newobj temp (or nullptr) +// newObjThis - tree for this pointer or uninitialized newobj temp (or nullptr) // prefixFlags - IL prefix flags for the call // callInfo - EE supplied info for the call // rawILOffset - IL offset of the opcode, used for guarded devirtualization. @@ -8651,7 +8651,7 @@ bool Compiler::impIsImplicitTailCallCandidate( // opcode can be CEE_CALL, CEE_CALLI, CEE_CALLVIRT, or CEE_NEWOBJ. // // For CEE_NEWOBJ, newobjThis should be the temp grabbed for the allocated -// uninitalized object. +// uninitialized object. #ifdef _PREFAST_ #pragma warning(push) @@ -10159,7 +10159,7 @@ var_types Compiler::impImportJitTestLabelMark(int numArgs) { // A loop hoist annotation with value >= 100 means that the expression should be a static field access, // a GT_IND of a static field address, which should be the sum of a (hoistable) helper call and possibly some - // offset within the the static field block whose address is returned by the helper call. + // offset within the static field block whose address is returned by the helper call. // The annotation is saying that this address calculation, but not the entire access, should be hoisted. assert(node->OperGet() == GT_IND); tlAndN.m_num -= 100; @@ -10407,7 +10407,7 @@ GenTree* Compiler::impFixupStructReturnType(GenTree* op, // really have a return buffer, but instead use it as a way // to keep the trees cleaner with fewer address-taken temps. // - // Well now we have to materialize the the return buffer as + // Well now we have to materialize the return buffer as // an address-taken temp. Then we can return the temp. // // NOTE: this code assumes that since the call directly diff --git a/src/coreclr/jit/indirectcalltransformer.cpp b/src/coreclr/jit/indirectcalltransformer.cpp index 64431aaf88b..52ad8090f31 100644 --- a/src/coreclr/jit/indirectcalltransformer.cpp +++ b/src/coreclr/jit/indirectcalltransformer.cpp @@ -872,7 +872,7 @@ private: } // Finally, rewire the cold block to jump to the else block, - // not fall through to the the check block. + // not fall through to the check block. // coldBlock->bbJumpKind = BBJ_ALWAYS; coldBlock->bbJumpDest = elseBlock; diff --git a/src/coreclr/jit/jiteh.cpp b/src/coreclr/jit/jiteh.cpp index 3d338ff266d..7a5297ad61b 100644 --- a/src/coreclr/jit/jiteh.cpp +++ b/src/coreclr/jit/jiteh.cpp @@ -4518,7 +4518,7 @@ void Compiler::fgExtendEHRegionAfter(BasicBlock* block) // inserting the block and properly extending some EH regions (if necessary) // puts the block in the correct region. We only consider the case of extending // an EH region after 'blk' (that is, to include 'blk' and the newly insert block); -// we don't consider inserting a block as the the first block of an EH region following 'blk'. +// we don't consider inserting a block as the first block of an EH region following 'blk'. // // Consider this example: // diff --git a/src/coreclr/jit/layout.h b/src/coreclr/jit/layout.h index ffe5adc31a6..b2d37c41634 100644 --- a/src/coreclr/jit/layout.h +++ b/src/coreclr/jit/layout.h @@ -23,7 +23,7 @@ class ClassLayout const unsigned m_isValueClass : 1; INDEBUG(unsigned m_gcPtrsInitialized : 1;) - // The number of GC pointers in this layout. Since the the maximum size is 2^32-1 the count + // The number of GC pointers in this layout. Since the maximum size is 2^32-1 the count // can fit in at most 30 bits. unsigned m_gcPtrCount : 30; diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp index 5f59e98aee9..a52342f86c7 100644 --- a/src/coreclr/jit/lclvars.cpp +++ b/src/coreclr/jit/lclvars.cpp @@ -1223,7 +1223,7 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo* varDscInfo, unsigned skipArgs, un // If we needed to use the stack in order to pass this argument then // record the fact that we have used up any remaining registers of this 'type' - // This prevents any 'backfilling' from occuring on ARM64/LoongArch64. + // This prevents any 'backfilling' from occurring on ARM64/LoongArch64. // varDscInfo->setAllRegArgUsed(argType); @@ -2263,7 +2263,7 @@ bool Compiler::StructPromotionHelper::ShouldPromoteStructVar(unsigned lclNum) // // If the lvRefCnt is zero and we have a struct promoted parameter we can end up with an extra store of - // the the incoming register into the stack frame slot. + // the incoming register into the stack frame slot. // In that case, we would like to avoid promortion. // However we haven't yet computed the lvRefCnt values so we can't do that. // diff --git a/src/coreclr/jit/lir.cpp b/src/coreclr/jit/lir.cpp index 6fec3364238..4e326e3ee87 100644 --- a/src/coreclr/jit/lir.cpp +++ b/src/coreclr/jit/lir.cpp @@ -1183,7 +1183,7 @@ LIR::ReadOnlyRange LIR::Range::GetMarkedRange(unsigned markCount, return GenTree::VisitResult::Continue; }); - // Unmark the the node and update `firstNode` + // Unmark the node and update `firstNode` firstNode->gtLIRFlags &= ~LIR::Flags::Mark; markCount--; } diff --git a/src/coreclr/jit/loopcloning.cpp b/src/coreclr/jit/loopcloning.cpp index a5c4d8ea6ed..1713db4979f 100644 --- a/src/coreclr/jit/loopcloning.cpp +++ b/src/coreclr/jit/loopcloning.cpp @@ -2294,7 +2294,7 @@ bool Compiler::optExtractArrIndex(GenTree* tree, ArrIndex* result, unsigned lhsN result->rank++; // If the array element type (saved from the GT_INDEX node during morphing) is anything but - // TYP_REF, then it must the the final level of jagged array. + // TYP_REF, then it must the final level of jagged array. assert(arrBndsChk->gtInxType != TYP_VOID); *topLevelIsFinal = (arrBndsChk->gtInxType != TYP_REF); diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp index d1419a6d841..8c5d0acc180 100644 --- a/src/coreclr/jit/lsra.cpp +++ b/src/coreclr/jit/lsra.cpp @@ -2738,7 +2738,7 @@ bool LinearScan::isMatchingConstant(RegRecord* physRegRecord, RefPosition* refPo // To select a ref position for spilling. // - If refPosition->RegOptional() == false // The RefPosition chosen for spilling will be the lowest weight -// of all and if there is is more than one ref position with the +// of all and if there is more than one ref position with the // same lowest weight, among them choses the one with farthest // distance to its next reference. // diff --git a/src/coreclr/jit/lsra.h b/src/coreclr/jit/lsra.h index 86978763a2b..89549dfbf60 100644 --- a/src/coreclr/jit/lsra.h +++ b/src/coreclr/jit/lsra.h @@ -2234,7 +2234,7 @@ public: // spillAfter indicates that the value is spilled here, so a spill must be added. // singleDefSpill indicates that it is associated with a single-def var and if it // is decided to get spilled, it will be spilled at firstRefPosition def. That - // way, the the value of stack will always be up-to-date and no more spills or + // way, the value of stack will always be up-to-date and no more spills or // resolutions (from reg to stack) will be needed for such single-def var. // copyReg indicates that the value needs to be copied to a specific register, // but that it will also retain its current assigned register. diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 202b4de2583..e3d14912f54 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -963,7 +963,7 @@ void CallArgs::ArgsComplete(Compiler* comp, GenTreeCall* call) if (argObj->AsObj()->gtOp1->IsLocalAddrExpr() == nullptr) // Is the source not a LclVar? { // If we don't have a LclVar we need to read exactly 3,5,6 or 7 bytes - // For now we use a a GT_CPBLK to copy the exact size into a GT_LCL_VAR temp. + // For now we use a GT_CPBLK to copy the exact size into a GT_LCL_VAR temp. // SetNeedsTemp(&arg); } @@ -12923,7 +12923,7 @@ GenTree* Compiler::fgOptimizeRelationalComparisonWithConst(GenTreeOp* cmp) // node - HWIntrinsic node to examine // // Returns: -// The original node if no optimization happened or if tree bashing occured. +// The original node if no optimization happened or if tree bashing occurred. // An alternative tree if an optimization happened. // // Notes: diff --git a/src/coreclr/jit/optcse.cpp b/src/coreclr/jit/optcse.cpp index 671f800222a..335a4c1d4fb 100644 --- a/src/coreclr/jit/optcse.cpp +++ b/src/coreclr/jit/optcse.cpp @@ -2312,7 +2312,7 @@ public: If we are unable to enregister the CSE then the cse-use-cost is IND_COST and the cse-def-cost is also IND_COST. - If we want to be conservative we use IND_COST as the the value + If we want to be conservative we use IND_COST as the value for both cse-def-cost and cse-use-cost and then we never introduce a CSE that could pessimize the execution time of the method. diff --git a/src/coreclr/jit/optimizer.cpp b/src/coreclr/jit/optimizer.cpp index 08d6cb919ba..2c7e9e8c097 100644 --- a/src/coreclr/jit/optimizer.cpp +++ b/src/coreclr/jit/optimizer.cpp @@ -6407,7 +6407,7 @@ void Compiler::optRecordLoopMemoryDependence(GenTree* tree, BasicBlock* block, V updateLoopNum = updateParentLoopNum; } - // If the update block is not the the header of a loop containing + // If the update block is not the header of a loop containing // block, we can also ignore the update. // if (!optLoopContains(updateLoopNum, loopNum)) diff --git a/src/coreclr/jit/simd.cpp b/src/coreclr/jit/simd.cpp index 014d4c42867..45868e524f1 100644 --- a/src/coreclr/jit/simd.cpp +++ b/src/coreclr/jit/simd.cpp @@ -1486,7 +1486,7 @@ SIMDIntrinsicID Compiler::impSIMDRelOp(SIMDIntrinsicID relOpIntrinsicId, // // Arguments: // opcode - the opcode being handled (needed to identify the CEE_NEWOBJ case) -// newobjThis - For CEE_NEWOBJ, this is the temp grabbed for the allocated uninitalized object. +// newobjThis - For CEE_NEWOBJ, this is the temp grabbed for the allocated uninitialized object. // clsHnd - The handle of the class of the method. // // Return Value: @@ -1870,7 +1870,7 @@ void Compiler::impMarkContiguousSIMDFieldAssignments(Statement* stmt) // // Arguments: // opcode - the opcode being handled (needed to identify the CEE_NEWOBJ case) -// newobjThis - For CEE_NEWOBJ, this is the temp grabbed for the allocated uninitalized object. +// newobjThis - For CEE_NEWOBJ, this is the temp grabbed for the allocated uninitialized object. // clsHnd - The handle of the class of the method. // method - The handle of the method. // sig - The call signature for the method. diff --git a/src/coreclr/jit/target.h b/src/coreclr/jit/target.h index e5bf31e7f66..3a96f4bf96e 100644 --- a/src/coreclr/jit/target.h +++ b/src/coreclr/jit/target.h @@ -706,7 +706,7 @@ C_ASSERT(sizeof(target_ssize_t) == TARGET_POINTER_SIZE); #if defined(TARGET_X86) // instrDescCns holds constant values for the emitter. The X86 compiler is unique in that it // may represent relocated pointer values with these constants. On the 64bit to 32 bit -// cross-targetting jit, the the constant value must be represented as a 64bit value in order +// cross-targetting jit, the constant value must be represented as a 64bit value in order // to represent these pointers. typedef ssize_t cnsval_ssize_t; typedef size_t cnsval_size_t; diff --git a/src/coreclr/jit/targetamd64.h b/src/coreclr/jit/targetamd64.h index 4af59d4ed91..1d4a3cbc9aa 100644 --- a/src/coreclr/jit/targetamd64.h +++ b/src/coreclr/jit/targetamd64.h @@ -15,7 +15,7 @@ #define CPBLK_UNROLL_LIMIT 64 // Upper bound to let the code generator to loop unroll CpBlk. #define INITBLK_UNROLL_LIMIT 128 // Upper bound to let the code generator to loop unroll InitBlk. - #define CPOBJ_NONGC_SLOTS_LIMIT 4 // For CpObj code generation, this is the the threshold of the number + #define CPOBJ_NONGC_SLOTS_LIMIT 4 // For CpObj code generation, this is the threshold of the number // of contiguous non-gc slots that trigger generating rep movsq instead of // sequences of movsq instructions diff --git a/src/coreclr/jit/targetx86.h b/src/coreclr/jit/targetx86.h index 0c93ed8c74d..044b9f201d5 100644 --- a/src/coreclr/jit/targetx86.h +++ b/src/coreclr/jit/targetx86.h @@ -15,7 +15,7 @@ #define CPBLK_UNROLL_LIMIT 64 // Upper bound to let the code generator to loop unroll CpBlk. #define INITBLK_UNROLL_LIMIT 128 // Upper bound to let the code generator to loop unroll InitBlk. - #define CPOBJ_NONGC_SLOTS_LIMIT 4 // For CpObj code generation, this is the the threshold of the number + #define CPOBJ_NONGC_SLOTS_LIMIT 4 // For CpObj code generation, this is the threshold of the number // of contiguous non-gc slots that trigger generating rep movsq instead of // sequences of movsq instructions diff --git a/src/coreclr/jit/unwind.h b/src/coreclr/jit/unwind.h index 8e032a65221..46485e0eb11 100644 --- a/src/coreclr/jit/unwind.h +++ b/src/coreclr/jit/unwind.h @@ -70,7 +70,7 @@ class UnwindEpilogInfo; class UnwindFragmentInfo; class UnwindInfo; -// UnwindBase: A base class shared by the the unwind classes that require +// UnwindBase: A base class shared by the unwind classes that require // a Compiler* for memory allocation. class UnwindBase @@ -90,7 +90,7 @@ protected: Compiler* uwiComp; }; -// UnwindCodesBase: A base class shared by the the classes used to represent the prolog +// UnwindCodesBase: A base class shared by the classes used to represent the prolog // and epilog unwind codes. class UnwindCodesBase diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp index ef71522ff40..87415117135 100644 --- a/src/coreclr/jit/valuenum.cpp +++ b/src/coreclr/jit/valuenum.cpp @@ -7299,7 +7299,7 @@ void Compiler::fgValueNumber() else if (info.compInitMem || varDsc->lvMustInit || VarSetOps::IsMember(this, fgFirstBB->bbLiveIn, varDsc->lvVarIndex)) { - // The last clause covers the use-before-def variables (the ones that are live-in to the the first block), + // The last clause covers the use-before-def variables (the ones that are live-in to the first block), // these are variables that are read before being initialized (at least on some control flow paths) // if they are not must-init, then they get VNF_InitVal(i), as with the param case.) diff --git a/src/coreclr/jit/valuenum.h b/src/coreclr/jit/valuenum.h index b0cbc1e0653..470d3c9d926 100644 --- a/src/coreclr/jit/valuenum.h +++ b/src/coreclr/jit/valuenum.h @@ -486,7 +486,7 @@ public: #endif // FEATURE_SIMD // Create or return the existimg value number representing a singleton exception set - // for the the exception value "x". + // for the exception value "x". ValueNum VNExcSetSingleton(ValueNum x); ValueNumPair VNPExcSetSingleton(ValueNumPair x); diff --git a/src/coreclr/md/enc/mdinternalrw.cpp b/src/coreclr/md/enc/mdinternalrw.cpp index 7ef282e5c5a..e46adce944b 100644 --- a/src/coreclr/md/enc/mdinternalrw.cpp +++ b/src/coreclr/md/enc/mdinternalrw.cpp @@ -1797,7 +1797,7 @@ ErrExit: //***************************************************************************** // return a pointer which points to meta data's internal string -// return the the type name in utf8 +// return the type name in utf8 //***************************************************************************** __checkReturn HRESULT diff --git a/src/coreclr/md/runtime/mdinternalro.cpp b/src/coreclr/md/runtime/mdinternalro.cpp index 921280bfdbf..1a7fb2f42bb 100644 --- a/src/coreclr/md/runtime/mdinternalro.cpp +++ b/src/coreclr/md/runtime/mdinternalro.cpp @@ -936,7 +936,7 @@ HRESULT MDInternalRO::FindParamOfMethod(// S_OK or error. //***************************************************************************** // return a pointer which points to meta data's internal string -// return the the type name in utf8 +// return the type name in utf8 //***************************************************************************** __checkReturn HRESULT diff --git a/src/coreclr/nativeaot/Common/src/Internal/Runtime/MethodTable.cs b/src/coreclr/nativeaot/Common/src/Internal/Runtime/MethodTable.cs index f30616014a7..07dd95f67c9 100644 --- a/src/coreclr/nativeaot/Common/src/Internal/Runtime/MethodTable.cs +++ b/src/coreclr/nativeaot/Common/src/Internal/Runtime/MethodTable.cs @@ -1592,7 +1592,7 @@ namespace Internal.Runtime // This is a function pointer with the following signature IntPtr()(MethodTable* targetType, MethodTable* interfaceType, ushort slot) private delegate* _dynamicTypeSlotDispatchResolve; - // Starting address for the the binary module corresponding to this dynamic module. + // Starting address for the binary module corresponding to this dynamic module. private delegate* _getRuntimeException; #if TYPE_LOADER_IMPLEMENTATION diff --git a/src/coreclr/nativeaot/Runtime/RestrictedCallouts.h b/src/coreclr/nativeaot/Runtime/RestrictedCallouts.h index 3a70c735296..40eaf8395ba 100644 --- a/src/coreclr/nativeaot/Runtime/RestrictedCallouts.h +++ b/src/coreclr/nativeaot/Runtime/RestrictedCallouts.h @@ -15,7 +15,7 @@ // * No use of runtime facilities that check whether a GC is in progress, these will deadlock. The big // example we know about so far is making a p/invoke call. // * For the AfterMarkPhase callout special attention must be paid to avoid any action that reads the MethodTable* -// from an object header (e.g. casting). At this point the GC may have mark bits set in the the pointer. +// from an object header (e.g. casting). At this point the GC may have mark bits set in the pointer. // class MethodTable; diff --git a/src/coreclr/nativeaot/Runtime/amd64/GcProbe.asm b/src/coreclr/nativeaot/Runtime/amd64/GcProbe.asm index 4426c42009a..79abdc30092 100644 --- a/src/coreclr/nativeaot/Runtime/amd64/GcProbe.asm +++ b/src/coreclr/nativeaot/Runtime/amd64/GcProbe.asm @@ -318,7 +318,7 @@ NESTED_ENTRY RhpHijackForGcStress, _TEXT lea rcx, [rsp + 20h + 6*10h + 2*8h] ;; address of PAL_LIMITED_CONTEXT call THREAD__HIJACKFORGCSTRESS - ;; Note: we only restore the scratch registers here. No GC has occured, so restoring + ;; Note: we only restore the scratch registers here. No GC has occurred, so restoring ;; the callee saved ones is unnecessary. mov rax, [rsp + 20h + 6*10h + 2*8h + OFFSETOF__PAL_LIMITED_CONTEXT__Rax] mov rcx, [rsp + 20h + 6*10h + 0*8h] diff --git a/src/coreclr/nativeaot/Runtime/amd64/StubDispatch.S b/src/coreclr/nativeaot/Runtime/amd64/StubDispatch.S index 2f400c76e4e..9e1239d1de0 100644 --- a/src/coreclr/nativeaot/Runtime/amd64/StubDispatch.S +++ b/src/coreclr/nativeaot/Runtime/amd64/StubDispatch.S @@ -34,7 +34,7 @@ LEAF_ENTRY RhpInterfaceDispatch\entries, _TEXT CurrentOffset = CurrentOffset + 16 .endr - // r10 still contains the the indirection cell address. + // r10 still contains the indirection cell address. jmp C_FUNC(RhpInterfaceDispatchSlow) LEAF_END RhpInterfaceDispatch\entries, _TEXT diff --git a/src/coreclr/nativeaot/Runtime/amd64/StubDispatch.asm b/src/coreclr/nativeaot/Runtime/amd64/StubDispatch.asm index 7a30b63a95a..b93d948ad5d 100644 --- a/src/coreclr/nativeaot/Runtime/amd64/StubDispatch.asm +++ b/src/coreclr/nativeaot/Runtime/amd64/StubDispatch.asm @@ -45,7 +45,7 @@ CurrentEntry = 0 CurrentEntry = CurrentEntry + 1 endm - ;; r10 still contains the the indirection cell address. + ;; r10 still contains the indirection cell address. jmp RhpInterfaceDispatchSlow diff --git a/src/coreclr/nativeaot/Runtime/eventtrace.cpp b/src/coreclr/nativeaot/Runtime/eventtrace.cpp index fd10ac2874a..55138d7fec0 100644 --- a/src/coreclr/nativeaot/Runtime/eventtrace.cpp +++ b/src/coreclr/nativeaot/Runtime/eventtrace.cpp @@ -4253,7 +4253,7 @@ void ETW::MethodLog::StubInitialized(ULONGLONG ullHelperStartAddress, LPCWSTR pH /**********************************************************/ /* This is called by the runtime when helpers with stubs are initialized */ /**********************************************************/ -void ETW::MethodLog::StubsInitialized(PVOID* pHelperStartAddresss, PVOID* pHelperNames, LONG lNoOfHelpers) +void ETW::MethodLog::StubsInitialized(PVOID* pHelperStartAddress, PVOID* pHelperNames, LONG lNoOfHelpers) { WRAPPER_NO_CONTRACT; @@ -4263,9 +4263,9 @@ void ETW::MethodLog::StubsInitialized(PVOID* pHelperStartAddresss, PVOID* pHelpe { for (int i = 0; i < lNoOfHelpers; i++) { - if (pHelperStartAddresss[i]) + if (pHelperStartAddress[i]) { - StubInitialized((ULONGLONG)pHelperStartAddresss[i], (LPCWSTR)pHelperNames[i]); + StubInitialized((ULONGLONG)pHelperStartAddress[i], (LPCWSTR)pHelperNames[i]); } } } diff --git a/src/coreclr/nativeaot/Runtime/eventtracebase.h b/src/coreclr/nativeaot/Runtime/eventtracebase.h index e4a16fd87d6..d9eccb28f2b 100644 --- a/src/coreclr/nativeaot/Runtime/eventtracebase.h +++ b/src/coreclr/nativeaot/Runtime/eventtracebase.h @@ -477,7 +477,7 @@ namespace ETW static void MethodJitting(MethodDesc *pMethodDesc, SString *namespaceOrClassName=NULL, SString *methodName=NULL, SString *methodSignature=NULL); static void MethodJitted(MethodDesc *pMethodDesc, SString *namespaceOrClassName=NULL, SString *methodName=NULL, SString *methodSignature=NULL, SIZE_T pCode = 0, ReJITID rejitID = 0); static void StubInitialized(ULONGLONG ullHelperStartAddress, LPCWSTR pHelperName); - static void StubsInitialized(PVOID *pHelperStartAddresss, PVOID *pHelperNames, LONG ulNoOfHelpers); + static void StubsInitialized(PVOID *pHelperStartAddress, PVOID *pHelperNames, LONG ulNoOfHelpers); static void MethodRestored(MethodDesc * pMethodDesc); static void MethodTableRestored(MethodTable * pMethodTable); static void DynamicMethodDestroyed(MethodDesc *pMethodDesc); @@ -486,7 +486,7 @@ namespace ETW static void MethodJitting(MethodDesc *pMethodDesc, SString *namespaceOrClassName=NULL, SString *methodName=NULL, SString *methodSignature=NULL) {}; static void MethodJitted(MethodDesc *pMethodDesc, SString *namespaceOrClassName=NULL, SString *methodName=NULL, SString *methodSignature=NULL, SIZE_T pCode = 0, ReJITID rejitID = 0) {}; static void StubInitialized(ULONGLONG ullHelperStartAddress, LPCWSTR pHelperName) {}; - static void StubsInitialized(PVOID *pHelperStartAddresss, PVOID *pHelperNames, LONG ulNoOfHelpers) {}; + static void StubsInitialized(PVOID *pHelperStartAddress, PVOID *pHelperNames, LONG ulNoOfHelpers) {}; static void MethodRestored(MethodDesc * pMethodDesc) {}; static void MethodTableRestored(MethodTable * pMethodTable) {}; static void DynamicMethodDestroyed(MethodDesc *pMethodDesc) {}; diff --git a/src/coreclr/nativeaot/Runtime/gcheaputilities.cpp b/src/coreclr/nativeaot/Runtime/gcheaputilities.cpp index 1a0125b1316..2ed174fa8be 100644 --- a/src/coreclr/nativeaot/Runtime/gcheaputilities.cpp +++ b/src/coreclr/nativeaot/Runtime/gcheaputilities.cpp @@ -36,7 +36,7 @@ IGCHandleManager* g_pGCHandleManager = nullptr; GcDacVars g_gc_dac_vars; GPTR_IMPL(GcDacVars, g_gcDacGlobals); -// GC entrypoints for the the linked-in GC. These symbols are invoked +// GC entrypoints for the linked-in GC. These symbols are invoked // directly if we are not using a standalone GC. extern "C" HRESULT GC_Initialize( /* In */ IGCToCLR* clrToGC, diff --git a/src/coreclr/nativeaot/Runtime/i386/GcProbe.asm b/src/coreclr/nativeaot/Runtime/i386/GcProbe.asm index 41fe6a13027..cc350f6ceef 100644 --- a/src/coreclr/nativeaot/Runtime/i386/GcProbe.asm +++ b/src/coreclr/nativeaot/Runtime/i386/GcProbe.asm @@ -346,7 +346,7 @@ FASTCALL_FUNC RhpHijackForGcStress, 0 push esp ;; address of PAL_LIMITED_CONTEXT call THREAD__HIJACKFORGCSTRESS - ;; Note: we only restore the scratch registers here. No GC has occured, so restoring + ;; Note: we only restore the scratch registers here. No GC has occurred, so restoring ;; the callee saved ones is unnecessary. add esp, 14h pop eax diff --git a/src/coreclr/nativeaot/Runtime/inc/daccess.h b/src/coreclr/nativeaot/Runtime/inc/daccess.h index c68597b41b3..fbd444f6012 100644 --- a/src/coreclr/nativeaot/Runtime/inc/daccess.h +++ b/src/coreclr/nativeaot/Runtime/inc/daccess.h @@ -1666,7 +1666,7 @@ public: return DacGlobalBase() + *m_rvaPtr; } - // This is only testing the the pointer memory is available but does not verify + // This is only testing the pointer memory is available but does not verify // the memory that it points to. // bool IsValidPtr(void) const diff --git a/src/coreclr/nativeaot/Runtime/stressLog.cpp b/src/coreclr/nativeaot/Runtime/stressLog.cpp index 2e25b6bcfa7..757c7076b78 100644 --- a/src/coreclr/nativeaot/Runtime/stressLog.cpp +++ b/src/coreclr/nativeaot/Runtime/stressLog.cpp @@ -71,7 +71,7 @@ unsigned __int64 getTimeStamp() { #endif // HOST_X86 else /*********************************************************************************/ -/* Get the the frequency corresponding to 'getTimeStamp'. For non-x86 +/* Get the frequency corresponding to 'getTimeStamp'. For non-x86 architectures, this is just the performance counter frequency. */ unsigned __int64 getTickFrequency() diff --git a/src/coreclr/nativeaot/Runtime/thread.cpp b/src/coreclr/nativeaot/Runtime/thread.cpp index f091318acf6..f540c516544 100644 --- a/src/coreclr/nativeaot/Runtime/thread.cpp +++ b/src/coreclr/nativeaot/Runtime/thread.cpp @@ -1,5 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. + #include "common.h" #include "CommonTypes.h" #include "CommonMacros.h" @@ -526,7 +527,7 @@ void Thread::GcScanRootsWorker(void * pfnEnumCallback, void * pvCallbackData, St // references which are unreported by any managed method on the stack at the time of the GC we // identify (again conservatively) the range of the stack that might contain these references and // report everything. Since it should be a very rare occurrence indeed that we actually have to do - // this this, it's considered a better trade-off than storing signature metadata for every potential + // this, it's considered a better trade-off than storing signature metadata for every potential // callsite of the type described above. if (frameIterator.HasStackRangeToReportConservatively()) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs index 783f75f41ef..dbf195b409d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs @@ -449,7 +449,7 @@ namespace System private static uint s_iteration; /// - /// Resets the pressure accounting after a gen2 GC has occured. + /// Resets the pressure accounting after a gen2 GC has occurred. /// private static void CheckCollectionCount() { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Extensions/NonPortable/DelegateMethodInfoRetriever.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Extensions/NonPortable/DelegateMethodInfoRetriever.cs index 59e612de7d0..d8b2b88fb39 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Extensions/NonPortable/DelegateMethodInfoRetriever.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Extensions/NonPortable/DelegateMethodInfoRetriever.cs @@ -27,7 +27,7 @@ namespace Internal.Reflection.Extensions.NonPortable if (isInterpreterEntrypoint) { // This is a special kind of delegate where the invoke method is "ObjectArrayThunk". Typically, - // this will be a delegate that points the the LINQ Expression interpreter. We could manufacture + // this will be a delegate that points the LINQ Expression interpreter. We could manufacture // a MethodInfo based on the delegate's Invoke signature, but let's just throw for now. throw new PlatformNotSupportedException(SR.DelegateGetMethodInfo_ObjectArrayDelegate); } diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.StaticsLookup.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.StaticsLookup.cs index 95a09386f40..d6810252ab7 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.StaticsLookup.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.StaticsLookup.cs @@ -54,7 +54,7 @@ namespace Internal.Runtime.TypeLoader else { // If the type does not have a Cctor context, search for the field on the type in the field map which has the lowest offset, - // yet has the the correct type of storage. + // yet has the correct type of storage. IntPtr staticAddress; if (TryGetStaticFieldBaseFromFieldAccessMap(runtimeTypeHandle, FieldAccessStaticDataKind.NonGC, out staticAddress)) { @@ -118,7 +118,7 @@ namespace Internal.Runtime.TypeLoader if (!typeAsEEType->IsDynamicType && !typeAsEEType->IsGeneric) { //search for the field on the type in the field map which has the lowest offset, - // yet has the the correct type of storage. + // yet has the correct type of storage. IntPtr staticAddress; if (TryGetStaticFieldBaseFromFieldAccessMap(runtimeTypeHandle, FieldAccessStaticDataKind.GC, out staticAddress)) { diff --git a/src/coreclr/nativeaot/libunwind/include/mach-o/compact_unwind_encoding.h b/src/coreclr/nativeaot/libunwind/include/mach-o/compact_unwind_encoding.h index 5301b1055ef..08f943fef2a 100644 --- a/src/coreclr/nativeaot/libunwind/include/mach-o/compact_unwind_encoding.h +++ b/src/coreclr/nativeaot/libunwind/include/mach-o/compact_unwind_encoding.h @@ -108,7 +108,7 @@ enum { // are encoded in the UNWIND_X86_EBP_FRAME_REGISTERS bits as five 3-bit entries. // Each entry contains which register to restore. // UNWIND_X86_MODE_STACK_IMMD: -// A "frameless" (EBP not used as frame pointer) function with a small +// A "frameless" (EBP not used as frame pointer) function with a small // constant stack size. To return, a constant (encoded in the compact // unwind encoding) is added to the ESP. Then the return is done by // popping the stack into the pc. @@ -119,16 +119,16 @@ enum { // UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION constains which registers were // saved and their order. // UNWIND_X86_MODE_STACK_IND: -// A "frameless" (EBP not used as frame pointer) function large constant +// A "frameless" (EBP not used as frame pointer) function large constant // stack size. This case is like the previous, except the stack size is too -// large to encode in the compact unwind encoding. Instead it requires that -// the function contains "subl $nnnnnnnn,ESP" in its prolog. The compact +// large to encode in the compact unwind encoding. Instead it requires that +// the function contains "subl $nnnnnnnn,ESP" in its prolog. The compact // encoding contains the offset to the nnnnnnnn value in the function in -// UNWIND_X86_FRAMELESS_STACK_SIZE. +// UNWIND_X86_FRAMELESS_STACK_SIZE. // UNWIND_X86_MODE_DWARF: // No compact unwind encoding is available. Instead the low 24-bits of the // compact encoding is the offset of the DWARF FDE in the __eh_frame section. -// This mode is never used in object files. It is only generated by the +// This mode is never used in object files. It is only generated by the // linker in final linked images which have only DWARF unwind info for a // function. // @@ -233,36 +233,36 @@ enum { // For x86_64 there are four modes for the compact unwind encoding: // UNWIND_X86_64_MODE_RBP_FRAME: // RBP based frame where RBP is push on stack immediately after return address, -// then RSP is moved to RBP. Thus, to unwind RSP is restored with the current -// EPB value, then RBP is restored by popping off the stack, and the return +// then RSP is moved to RBP. Thus, to unwind RSP is restored with the current +// EPB value, then RBP is restored by popping off the stack, and the return // is done by popping the stack once more into the pc. // All non-volatile registers that need to be restored must have been saved -// in a small range in the stack that starts RBP-8 to RBP-2040. The offset/8 +// in a small range in the stack that starts RBP-8 to RBP-2040. The offset/8 // is encoded in the UNWIND_X86_64_RBP_FRAME_OFFSET bits. The registers saved // are encoded in the UNWIND_X86_64_RBP_FRAME_REGISTERS bits as five 3-bit entries. -// Each entry contains which register to restore. +// Each entry contains which register to restore. // UNWIND_X86_64_MODE_STACK_IMMD: -// A "frameless" (RBP not used as frame pointer) function with a small -// constant stack size. To return, a constant (encoded in the compact -// unwind encoding) is added to the RSP. Then the return is done by +// A "frameless" (RBP not used as frame pointer) function with a small +// constant stack size. To return, a constant (encoded in the compact +// unwind encoding) is added to the RSP. Then the return is done by // popping the stack into the pc. // All non-volatile registers that need to be restored must have been saved // on the stack immediately after the return address. The stack_size/8 is // encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048). // The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT. // UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION constains which registers were -// saved and their order. +// saved and their order. // UNWIND_X86_64_MODE_STACK_IND: -// A "frameless" (RBP not used as frame pointer) function large constant +// A "frameless" (RBP not used as frame pointer) function large constant // stack size. This case is like the previous, except the stack size is too -// large to encode in the compact unwind encoding. Instead it requires that -// the function contains "subq $nnnnnnnn,RSP" in its prolog. The compact +// large to encode in the compact unwind encoding. Instead it requires that +// the function contains "subq $nnnnnnnn,RSP" in its prolog. The compact // encoding contains the offset to the nnnnnnnn value in the function in -// UNWIND_X86_64_FRAMELESS_STACK_SIZE. +// UNWIND_X86_64_FRAMELESS_STACK_SIZE. // UNWIND_X86_64_MODE_DWARF: // No compact unwind encoding is available. Instead the low 24-bits of the // compact encoding is the offset of the DWARF FDE in the __eh_frame section. -// This mode is never used in object files. It is only generated by the +// This mode is never used in object files. It is only generated by the // linker in final linked images which have only DWARF unwind info for a // function. // @@ -307,20 +307,20 @@ enum { // This is a standard arm64 prolog where FP/LR are immediately pushed on the // stack, then SP is copied to FP. If there are any non-volatile registers // saved, then are copied into the stack frame in pairs in a contiguous -// range right below the saved FP/LR pair. Any subset of the five X pairs +// range right below the saved FP/LR pair. Any subset of the five X pairs // and four D pairs can be saved, but the memory layout must be in register -// number order. +// number order. // UNWIND_ARM64_MODE_FRAMELESS: -// A "frameless" leaf function, where FP/LR are not saved. The return address +// A "frameless" leaf function, where FP/LR are not saved. The return address // remains in LR throughout the function. If any non-volatile registers // are saved, they must be pushed onto the stack before any stack space is // allocated for local variables. The stack sized (including any saved -// non-volatile registers) divided by 16 is encoded in the bits +// non-volatile registers) divided by 16 is encoded in the bits // UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK. // UNWIND_ARM64_MODE_DWARF: // No compact unwind encoding is available. Instead the low 24-bits of the // compact encoding is the offset of the DWARF FDE in the __eh_frame section. -// This mode is never used in object files. It is only generated by the +// This mode is never used in object files. It is only generated by the // linker in final linked images which have only DWARF unwind info for a // function. // @@ -337,19 +337,19 @@ enum { // // A compiler can generated compact unwind information for a function by adding -// a "row" to the __LD,__compact_unwind section. This section has the -// S_ATTR_DEBUG bit set, so the section will be ignored by older linkers. -// It is removed by the new linker, so never ends up in final executables. -// This section is a table, initially with one row per function (that needs +// a "row" to the __LD,__compact_unwind section. This section has the +// S_ATTR_DEBUG bit set, so the section will be ignored by older linkers. +// It is removed by the new linker, so never ends up in final executables. +// This section is a table, initially with one row per function (that needs // unwind info). The table columns and some conceptual entries are: // // range-start pointer to start of function/range -// range-length -// compact-unwind-encoding 32-bit encoding +// range-length +// compact-unwind-encoding 32-bit encoding // personality-function or zero if no personality function // lsda or zero if no LSDA data // -// The length and encoding fields are 32-bits. The other are all pointer sized. +// The length and encoding fields are 32-bits. The other are all pointer sized. // // In x86_64 assembly, these entry would look like: // @@ -372,23 +372,23 @@ enum { // .quad except_tab1 // // -// Notes: There is no need for any labels in the the __compact_unwind section. -// The use of the .set directive is to force the evaluation of the +// Notes: There is no need for any labels in the __compact_unwind section. +// The use of the .set directive is to force the evaluation of the // range-length at assembly time, instead of generating relocations. // -// To support future compiler optimizations where which non-volatile registers +// To support future compiler optimizations where which non-volatile registers // are saved changes within a function (e.g. delay saving non-volatiles until // necessary), there can by multiple lines in the __compact_unwind table for one -// function, each with a different (non-overlapping) range and each with -// different compact unwind encodings that correspond to the non-volatiles +// function, each with a different (non-overlapping) range and each with +// different compact unwind encodings that correspond to the non-volatiles // saved at that range of the function. // // If a particular function is so wacky that there is no compact unwind way -// to encode it, then the compiler can emit traditional DWARF unwind info. +// to encode it, then the compiler can emit traditional DWARF unwind info. // The runtime will use which ever is available. // -// Runtime support for compact unwind encodings are only available on 10.6 -// and later. So, the compiler should not generate it when targeting pre-10.6. +// Runtime support for compact unwind encodings are only available on 10.6 +// and later. So, the compiler should not generate it when targeting pre-10.6. @@ -402,7 +402,7 @@ enum { // // The __TEXT,__unwind_info section is laid out for an efficient two level lookup. // The header of the section contains a coarse index that maps function address -// to the page (4096 byte block) containing the unwind info for that function. +// to the page (4096 byte block) containing the unwind info for that function. // #define UNWIND_SECTION_VERSION 1 diff --git a/src/coreclr/pal/inc/pal.h b/src/coreclr/pal/inc/pal.h index c4166337e4b..2e3e2c518a5 100644 --- a/src/coreclr/pal/inc/pal.h +++ b/src/coreclr/pal/inc/pal.h @@ -1602,7 +1602,7 @@ typedef struct _XMM_SAVE_AREA32 { // Context Frame // // This frame has a several purposes: 1) it is used as an argument to -// NtContinue, 2) is is used to constuct a call frame for APC delivery, +// NtContinue, 2) it is used to constuct a call frame for APC delivery, // and 3) it is used in the user level thread creation routines. // // diff --git a/src/coreclr/pal/src/cruntime/filecrt.cpp b/src/coreclr/pal/src/cruntime/filecrt.cpp index 78aab0c4d16..a3ddfe35600 100644 --- a/src/coreclr/pal/src/cruntime/filecrt.cpp +++ b/src/coreclr/pal/src/cruntime/filecrt.cpp @@ -433,7 +433,7 @@ CorUnix::InternalFwrite( nWrittenBytes = fwrite(pvBuffer, nSize, nCount, f); - // Make sure no error ocurred. + // Make sure no error occurred. if ( nWrittenBytes < nCount ) { // Set the FILE* error code diff --git a/src/coreclr/pal/src/exception/compact_unwind_encoding.h b/src/coreclr/pal/src/exception/compact_unwind_encoding.h index 3e9b0546e97..d2bfd9175c9 100644 --- a/src/coreclr/pal/src/exception/compact_unwind_encoding.h +++ b/src/coreclr/pal/src/exception/compact_unwind_encoding.h @@ -109,7 +109,7 @@ enum { // are encoded in the UNWIND_X86_EBP_FRAME_REGISTERS bits as five 3-bit entries. // Each entry contains which register to restore. // UNWIND_X86_MODE_STACK_IMMD: -// A "frameless" (EBP not used as frame pointer) function with a small +// A "frameless" (EBP not used as frame pointer) function with a small // constant stack size. To return, a constant (encoded in the compact // unwind encoding) is added to the ESP. Then the return is done by // popping the stack into the pc. @@ -120,16 +120,16 @@ enum { // UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION constains which registers were // saved and their order. // UNWIND_X86_MODE_STACK_IND: -// A "frameless" (EBP not used as frame pointer) function large constant +// A "frameless" (EBP not used as frame pointer) function large constant // stack size. This case is like the previous, except the stack size is too -// large to encode in the compact unwind encoding. Instead it requires that -// the function contains "subl $nnnnnnnn,ESP" in its prolog. The compact +// large to encode in the compact unwind encoding. Instead it requires that +// the function contains "subl $nnnnnnnn,ESP" in its prolog. The compact // encoding contains the offset to the nnnnnnnn value in the function in -// UNWIND_X86_FRAMELESS_STACK_SIZE. +// UNWIND_X86_FRAMELESS_STACK_SIZE. // UNWIND_X86_MODE_DWARF: // No compact unwind encoding is available. Instead the low 24-bits of the // compact encoding is the offset of the dwarf FDE in the __eh_frame section. -// This mode is never used in object files. It is only generated by the +// This mode is never used in object files. It is only generated by the // linker in final linked images which have only dwarf unwind info for a // function. // @@ -230,36 +230,36 @@ enum { // For x86_64 there are four modes for the compact unwind encoding: // UNWIND_X86_64_MODE_RBP_FRAME: // RBP based frame where RBP is push on stack immediately after return address, -// then RSP is moved to RBP. Thus, to unwind RSP is restored with the current -// EPB value, then RBP is restored by popping off the stack, and the return +// then RSP is moved to RBP. Thus, to unwind RSP is restored with the current +// EPB value, then RBP is restored by popping off the stack, and the return // is done by popping the stack once more into the pc. // All non-volatile registers that need to be restored must have been saved -// in a small range in the stack that starts RBP-8 to RBP-1020. The offset/4 +// in a small range in the stack that starts RBP-8 to RBP-1020. The offset/4 // is encoded in the UNWIND_X86_64_RBP_FRAME_OFFSET bits. The registers saved // are encoded in the UNWIND_X86_64_RBP_FRAME_REGISTERS bits as five 3-bit entries. -// Each entry contains which register to restore. +// Each entry contains which register to restore. // UNWIND_X86_64_MODE_STACK_IMMD: -// A "frameless" (RBP not used as frame pointer) function with a small -// constant stack size. To return, a constant (encoded in the compact -// unwind encoding) is added to the RSP. Then the return is done by +// A "frameless" (RBP not used as frame pointer) function with a small +// constant stack size. To return, a constant (encoded in the compact +// unwind encoding) is added to the RSP. Then the return is done by // popping the stack into the pc. // All non-volatile registers that need to be restored must have been saved // on the stack immediately after the return address. The stack_size/4 is // encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 1024). // The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT. // UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION constains which registers were -// saved and their order. +// saved and their order. // UNWIND_X86_64_MODE_STACK_IND: -// A "frameless" (RBP not used as frame pointer) function large constant +// A "frameless" (RBP not used as frame pointer) function large constant // stack size. This case is like the previous, except the stack size is too -// large to encode in the compact unwind encoding. Instead it requires that -// the function contains "subq $nnnnnnnn,RSP" in its prolog. The compact +// large to encode in the compact unwind encoding. Instead it requires that +// the function contains "subq $nnnnnnnn,RSP" in its prolog. The compact // encoding contains the offset to the nnnnnnnn value in the function in -// UNWIND_X86_64_FRAMELESS_STACK_SIZE. +// UNWIND_X86_64_FRAMELESS_STACK_SIZE. // UNWIND_X86_64_MODE_DWARF: // No compact unwind encoding is available. Instead the low 24-bits of the // compact encoding is the offset of the dwarf FDE in the __eh_frame section. -// This mode is never used in object files. It is only generated by the +// This mode is never used in object files. It is only generated by the // linker in final linked images which have only dwarf unwind info for a // function. // @@ -304,20 +304,20 @@ enum { // This is a standard arm64 prolog where FP/LR are immediately pushed on the // stack, then SP is copied to FP. If there are any non-volatile registers // saved, then are copied into the stack frame in pairs in a contiguous -// range right below the saved FP/LR pair. Any subset of the five X pairs +// range right below the saved FP/LR pair. Any subset of the five X pairs // and four D pairs can be saved, but the memory layout must be in register -// number order. +// number order. // UNWIND_ARM64_MODE_FRAMELESS: -// A "frameless" leaf function, where FP/LR are not saved. The return address +// A "frameless" leaf function, where FP/LR are not saved. The return address // remains in LR throughout the function. If any non-volatile registers // are saved, they must be pushed onto the stack before any stack space is // allocated for local variables. The stack sized (including any saved -// non-volatile registers) divided by 16 is encoded in the bits +// non-volatile registers) divided by 16 is encoded in the bits // UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK. // UNWIND_ARM64_MODE_DWARF: // No compact unwind encoding is available. Instead the low 24-bits of the // compact encoding is the offset of the dwarf FDE in the __eh_frame section. -// This mode is never used in object files. It is only generated by the +// This mode is never used in object files. It is only generated by the // linker in final linked images which have only dwarf unwind info for a // function. // @@ -334,19 +334,19 @@ enum { // // A compiler can generated compact unwind information for a function by adding -// a "row" to the __LD,__compact_unwind section. This section has the -// S_ATTR_DEBUG bit set, so the section will be ignored by older linkers. -// It is removed by the new linker, so never ends up in final executables. -// This section is a table, initially with one row per function (that needs +// a "row" to the __LD,__compact_unwind section. This section has the +// S_ATTR_DEBUG bit set, so the section will be ignored by older linkers. +// It is removed by the new linker, so never ends up in final executables. +// This section is a table, initially with one row per function (that needs // unwind info). The table columns and some conceptual entries are: // // range-start pointer to start of function/range -// range-length -// compact-unwind-encoding 32-bit encoding +// range-length +// compact-unwind-encoding 32-bit encoding // personality-function or zero if no personality function // lsda or zero if no LSDA data // -// The length and encoding fields are 32-bits. The other are all pointer sized. +// The length and encoding fields are 32-bits. The other are all pointer sized. // // In x86_64 assembly, these entry would look like: // @@ -369,23 +369,23 @@ enum { // .quad except_tab1 // // -// Notes: There is no need for any labels in the the __compact_unwind section. -// The use of the .set directive is to force the evaluation of the +// Notes: There is no need for any labels in the __compact_unwind section. +// The use of the .set directive is to force the evaluation of the // range-length at assembly time, instead of generating relocations. // -// To support future compiler optimizations where which non-volatile registers +// To support future compiler optimizations where which non-volatile registers // are saved changes within a function (e.g. delay saving non-volatiles until // necessary), there can by multiple lines in the __compact_unwind table for one -// function, each with a different (non-overlapping) range and each with -// different compact unwind encodings that correspond to the non-volatiles +// function, each with a different (non-overlapping) range and each with +// different compact unwind encodings that correspond to the non-volatiles // saved at that range of the function. // // If a particular function is so wacky that there is no compact unwind way -// to encode it, then the compiler can emit traditional dwarf unwind info. +// to encode it, then the compiler can emit traditional dwarf unwind info. // The runtime will use which ever is available. // -// Runtime support for compact unwind encodings are only available on 10.6 -// and later. So, the compiler should not generate it when targeting pre-10.6. +// Runtime support for compact unwind encodings are only available on 10.6 +// and later. So, the compiler should not generate it when targeting pre-10.6. @@ -399,7 +399,7 @@ enum { // // The __TEXT,__unwind_info section is laid out for an efficient two level lookup. // The header of the section contains a coarse index that maps function address -// to the page (4096 byte block) containing the unwind info for that function. +// to the page (4096 byte block) containing the unwind info for that function. // #define UNWIND_SECTION_VERSION 1 diff --git a/src/coreclr/pal/src/exception/seh-unwind.cpp b/src/coreclr/pal/src/exception/seh-unwind.cpp index fb0a3e76d9f..fd9756dffa3 100644 --- a/src/coreclr/pal/src/exception/seh-unwind.cpp +++ b/src/coreclr/pal/src/exception/seh-unwind.cpp @@ -496,7 +496,7 @@ void GetContextPointers(unw_cursor_t *cursor, unw_context_t *unwContext, KNONVOL #ifndef HOST_WINDOWS // Frame pointer relative offset of a local containing a pointer to the windows style context of a location -// where a hardware exception occured. +// where a hardware exception occurred. int g_hardware_exception_context_locvar_offset = 0; BOOL PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers) diff --git a/src/coreclr/pal/src/exception/signal.cpp b/src/coreclr/pal/src/exception/signal.cpp index 63b7ef115f2..8bacc320327 100644 --- a/src/coreclr/pal/src/exception/signal.cpp +++ b/src/coreclr/pal/src/exception/signal.cpp @@ -485,7 +485,7 @@ static void sigfpe_handler(int code, siginfo_t *siginfo, void *context) Function : signal_handler_worker - Handles signal on the original stack where the signal occured. + Handles signal on the original stack where the signal occurred. Invoked via setcontext. Parameters : @@ -532,7 +532,7 @@ Function : Parameters : POSIX signal handler parameter list ("man sigaction" for details) sp - stack pointer of the stack to execute the handler on. - If sp == 0, execute it on the original stack where the signal has occured. + If sp == 0, execute it on the original stack where the signal has occurred. Return : The return value from the signal handler --*/ diff --git a/src/coreclr/pal/src/include/pal/signal.hpp b/src/coreclr/pal/src/include/pal/signal.hpp index a1b721b8fd3..9dca625635d 100644 --- a/src/coreclr/pal/src/include/pal/signal.hpp +++ b/src/coreclr/pal/src/include/pal/signal.hpp @@ -64,7 +64,7 @@ extern "C" int SignalHandlerWorkerReturnOffset12; Function : signal_handler_worker - Handles signal on the original stack where the signal occured. + Handles signal on the original stack where the signal occurred. Invoked via setcontext. Parameters : diff --git a/src/coreclr/pal/src/objmgr/shmobject.cpp b/src/coreclr/pal/src/objmgr/shmobject.cpp index 35cfc76f33d..66bffbaba38 100644 --- a/src/coreclr/pal/src/objmgr/shmobject.cpp +++ b/src/coreclr/pal/src/objmgr/shmobject.cpp @@ -134,7 +134,7 @@ CSharedMemoryObject::Initialize( InitializeExit: - LOGEXIT("CSharedMemoryObject::Initalize returns %d\n", palError); + LOGEXIT("CSharedMemoryObject::Initialize returns %d\n", palError); return palError; } @@ -281,7 +281,7 @@ CSharedMemoryObject::InitializeFromExistingSharedData( InitializeFromExistingSharedDataExit: - LOGEXIT("CSharedMemoryObject::InitalizeFromExistingSharedData returns %d\n", palError); + LOGEXIT("CSharedMemoryObject::InitializeFromExistingSharedData returns %d\n", palError); return palError; } diff --git a/src/coreclr/pal/src/synchmgr/synchmanager.cpp b/src/coreclr/pal/src/synchmgr/synchmanager.cpp index 55a343de4d6..85d2e08c90f 100644 --- a/src/coreclr/pal/src/synchmgr/synchmanager.cpp +++ b/src/coreclr/pal/src/synchmgr/synchmanager.cpp @@ -2328,7 +2328,7 @@ namespace CorUnix } else if (0 > iRet) { - ERROR("Unable to read %d bytes from the the process pipe " + ERROR("Unable to read %d bytes from the process pipe " "[pipe=%d ret=%d errno=%d (%s)]\n", iBytes - iBytesRead, m_iProcessPipeRead, iRet, errno, strerror(errno)); goto RBFPP_exit; @@ -2977,7 +2977,7 @@ namespace CorUnix Method: CPalSynchronizationManager::MarkWaitForDelegatedObjectSignalingInProgress - Marks all the thread waiting list nodes involved in the the current wait-all + Marks all the thread waiting list nodes involved in the current wait-all for "delegated object signaling in progress", so that this wait cannot be involved in another delegated object signaling that may happen while the current object singaling is being tranfered to the target process (while diff --git a/src/coreclr/pal/tests/palsuite/c_runtime/rand_srand/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/c_runtime/rand_srand/test1/test1.cpp index fea66560c1f..cd752c39f53 100644 --- a/src/coreclr/pal/tests/palsuite/c_runtime/rand_srand/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/c_runtime/rand_srand/test1/test1.cpp @@ -6,14 +6,14 @@ ** Source: test1.c ** ** Purpose: Test to ensure that srand provide random -** number to rand. Also make sure that rand result from a +** number to rand. Also make sure that rand result from a ** srand with seed 1 and no call to srand are the same. ** ** Dependencies: PAL_Initialize ** PAL_Terminate ** Fail ** srand() -** +** ** **===========================================================================*/ @@ -22,7 +22,7 @@ PALTEST(c_runtime_rand_srand_test1_paltest_rand_srand_test1, "c_runtime/rand_srand/test1/paltest_rand_srand_test1") -{ +{ int RandNumber[10]; int TempRandNumber; int i; @@ -37,13 +37,13 @@ PALTEST(c_runtime_rand_srand_test1_paltest_rand_srand_test1, "c_runtime/rand_sra { return FAIL; } - + SRAND_SEED = time(NULL); - + /* does not initialize srand and call rand. */ for (i=0; i<10; i++) { - /* keep the value in a array */ + /* keep the value in an array */ RandNumber[i]=rand(); if (RandNumber[i] < 0 || RandNumber[i] > RAND_MAX) { @@ -56,18 +56,18 @@ PALTEST(c_runtime_rand_srand_test1_paltest_rand_srand_test1, "c_runtime/rand_sra srand(SRAND_SEED); - /* choose 10 numbers with a different seed. + /* choose 10 numbers with a different seed. the numbers should be different than those the previously generated one */ for(i = 0; i < 10; i++) { - TempRandNumber=rand(); + TempRandNumber=rand(); if (TempRandNumber < 0 || TempRandNumber > RAND_MAX) { Fail("2) ERROR: random generated an invalid value: %d", TempRandNumber); } } - + /* renitialize the srand with 1 */ @@ -86,7 +86,7 @@ PALTEST(c_runtime_rand_srand_test1_paltest_rand_srand_test1, "c_runtime/rand_sra { Fail ("ERROR: rand should return the same value when srand " "is initialized with 1 or not initialized at all"); - } + } if (TempRandNumber < 0 || TempRandNumber > RAND_MAX) { Fail("3) ERROR: random generated an invalid value: %d", TempRandNumber); diff --git a/src/coreclr/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp index 70081453c9b..052a623b55a 100644 --- a/src/coreclr/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp @@ -7,13 +7,11 @@ ** ** Purpose: ** Tests to see that wcsrchr correctly returns a pointer to the last occurrence -** of a character in a a string. +** of a character in a string. ** ** **==========================================================================*/ - - #include PALTEST(c_runtime_wcsrchr_test1_paltest_wcsrchr_test1, "c_runtime/wcsrchr/test1/paltest_wcsrchr_test1") diff --git a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecriticalsection/pal_composite_native_cs.cpp b/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecriticalsection/pal_composite_native_cs.cpp index ba077cba615..f7525f3a614 100644 --- a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecriticalsection/pal_composite_native_cs.cpp +++ b/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecriticalsection/pal_composite_native_cs.cpp @@ -36,7 +36,7 @@ struct statistics{ unsigned int processId; unsigned int operationsFailed; unsigned int operationsPassed; - unsigned int operationsTotal; + unsigned int operationsTotal; DWORD operationTime; unsigned int relationId; }; @@ -71,7 +71,7 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ //Variable Declaration pthread_t pthreads[640]; int threadID[640]; - int i=0; + int i=0; int j=0; int rtn=0; ULONGLONG startTicks = 0; @@ -87,7 +87,7 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ char mainFileName[MAX_PATH]; FILE *hMainFile; - //Get perfCallibrationValue + //Get perfCallibrationValue callibrationValue = getPerfCallibrationValue(); printf("Callibration Value for this Platform %llu \n", callibrationValue); @@ -97,7 +97,7 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ if(GetParameters(argc, argv)) { printf("Error in obtaining the parameters\n"); - exit(-1); + exit(-1); } //Assign Values to Application Statistics Members @@ -114,12 +114,12 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ printf("Repeat Count : %d\n", appStats.repeatCount); - //Open file for Application Statistics Collection + //Open file for Application Statistics Collection snprintf(mainFileName, MAX_PATH, "main_nativecriticalsection_%d_.txt",appStats.relationId); hMainFile = fopen(mainFileName, "w+"); if(hMainFile == NULL) - { + { printf("Error in opening main file for write\n"); } @@ -128,14 +128,14 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ { threadID[i] = i; } - + statisticsSize = sizeof(struct statistics); snprintf(fileName, MAX_PATH, "%d_thread_nativecriticalsection_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); hFile = fopen(fileName, "w+"); if(hFile == NULL) - { + { printf("Error in opening file for write for process [%d]\n", USE_PROCESS_COUNT); } @@ -161,12 +161,12 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ } //USE NATIVE METHOD TO GET TICK COUNT - startTicks = GetTicks(); - + startTicks = GetTicks(); + /*Loop to create number THREAD_COUNT number of threads*/ for (i=0;i< THREAD_COUNT;i++) { - + //printf("Creating Thread Count %d\n", i); //printf("Thread arrary value = %d\n", threadID[i]); rtn=pthread_create(&pthreads[i], NULL, waitforworkerthreads, &threadID[i]); @@ -175,10 +175,10 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ printf("Error: pthread Creat, %s \n", strerror(rtn)); exit(-1); } - + } - + //printf("Main Thread waits to recevie signal when all threads are done\n"); pthread_cond_wait(&g_cv2,&g_mutex); @@ -195,7 +195,7 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ printf("Error Broadcasting Conditional Event\n"); exit(-1); } - + //Release the lock if (0!=pthread_mutex_unlock(&g_mutex)) { @@ -220,13 +220,13 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ /*Write Application Results to File*/ //CAPTURE NATIVE TICK COUNT HERE appStats.operationTime = (DWORD)(GetTicks() - startTicks)/callibrationValue; - + /* Write Results to a file*/ if(hFile!= NULL) - { + { for( i = 0; i < THREAD_COUNT; i++ ) - { + { buffer = (struct statistics *)resultBuffer->getResultBuffer(i); fprintf(hFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); //printf("Iteration %d over\n", i); @@ -234,7 +234,7 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ } fclose(hFile); - + //Call Test Case Cleanup Routine if (0!=cleanuptest()) @@ -246,10 +246,10 @@ PALTEST(composite_synchronization_nativecriticalsection_paltest_synchronization_ if(hMainFile!= NULL) - { - printf("Writing to Main File \n"); + { + printf("Writing to Main File \n"); fprintf(hMainFile, "%lu,%d,%d,%d,%d,%s\n", appStats.operationTime, appStats.relationId, appStats.processCount, appStats.threadCount, appStats.repeatCount, appStats.buildNumber); - + } fclose(hMainFile); return 0; @@ -259,10 +259,10 @@ void * waitforworkerthreads(void * threadId) { int *threadParam = (int*) threadId; - + // printf("Thread ID : %d \n", *threadParam); - - //Accquire Lock + + //Accquire Lock if (0!=pthread_mutex_lock(&g_mutex)) { //Error Condition @@ -272,7 +272,7 @@ void * waitforworkerthreads(void * threadId) //Increment Global Counter GLOBAL_COUNTER++; - + //If global counter is equal to thread count then signal main thread if (GLOBAL_COUNTER == THREAD_COUNT) @@ -301,14 +301,14 @@ void * waitforworkerthreads(void * threadId) exit(-1); } - //Start the test + //Start the test starttests(*threadParam); - + } void starttests(int threadID) { - /*All threads beign executing tests cases*/ + /*All threads beign executing tests cases*/ int i = 0; int Id = threadID; struct statistics stats; @@ -322,9 +322,9 @@ void starttests(int threadID) stats.operationsPassed = 0; stats.operationsTotal = 0; stats.operationTime = 0; - + //Enter and Leave Critical Section in a loop REPEAT_COUNT Times - + startTime = GetTicks(); for (i=0;iLogResult(Id, (char *)&stats)) { printf("Error while writing to shared memory, Thread Id is[??] and Process id is [%d]\n", USE_PROCESS_COUNT); } - + } int setuptest(void) { - - //Initalize Critical Section + + //Initialize Critical Section if (0!=MTXInitializeCriticalSection( &g_cs)) { return -1; @@ -373,10 +373,10 @@ int setuptest(void) int cleanuptest(void) { - + //Delete Critical Section if (0!=MTXDeleteCriticalSection(&g_cs)) - { + { return -1; } return 0; @@ -385,42 +385,42 @@ int cleanuptest(void) int GetParameters( int argc, char **argv) { - if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) + if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) || !strcmp(argv[1],"/h") || !strcmp(argv[1],"/H")) { printf("PAL -Composite Native Critical Section Test\n"); printf("Usage:\n"); - printf("\t[PROCESS_ID ( greater than 1] \n"); - printf("\t[THREAD_COUNT ( greater than 1] \n"); + printf("\t[PROCESS_ID ( greater than 1] \n"); + printf("\t[THREAD_COUNT ( greater than 1] \n"); printf("\t[REPEAT_COUNT ( greater than 1]\n"); - printf("\t[RELATION_ID [greater than or Equal to 1]\n"); + printf("\t[RELATION_ID [greater than or Equal to 1]\n"); return -1; } - - + + USE_PROCESS_COUNT = atoi(argv[1]); - if( USE_PROCESS_COUNT < 0) + if( USE_PROCESS_COUNT < 0) { printf("\nInvalid THREAD_COUNT number, Pass greater than 1\n"); return -1; } THREAD_COUNT = atoi(argv[2]); - if( THREAD_COUNT < 1) + if( THREAD_COUNT < 1) { printf("\nInvalid THREAD_COUNT number, Pass greater than 1\n"); return -1; } REPEAT_COUNT = atoi(argv[3]); - if( REPEAT_COUNT < 1) + if( REPEAT_COUNT < 1) { printf("\nInvalid REPEAT_COUNT number, Pass greater than 1\n"); return -1; } RELATION_ID = atoi(argv[4]); - if( RELATION_ID < 1) + if( RELATION_ID < 1) { printf("\nInvalid RELATION_ID number, Pass greater than 1\n"); return -1; @@ -436,7 +436,7 @@ void incrementCounter(void) } -//Implementation borrowed from pertrace.c +//Implementation borrowed from pertrace.c ULONGLONG GetTicks(void) { #ifdef i386 @@ -455,11 +455,11 @@ ULONGLONG getPerfCallibrationValue(void) { ULONGLONG startTicks; ULONGLONG endTicks; - - startTicks = GetTicks(); + + startTicks = GetTicks(); sleep(1); endTicks = GetTicks(); - + return ((endTicks-startTicks)/1000); //Return number of Ticks in One Milliseconds } diff --git a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.cpp b/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.cpp index 3f1d31e5d1b..bcefb3f792f 100644 --- a/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.cpp +++ b/src/coreclr/pal/tests/palsuite/composite/synchronization/nativecs_interlocked/pal_composite_native_cs.cpp @@ -36,7 +36,7 @@ struct statistics{ unsigned int processId; unsigned int operationsFailed; unsigned int operationsPassed; - unsigned int operationsTotal; + unsigned int operationsTotal; DWORD operationTime; unsigned int relationId; }; @@ -71,7 +71,7 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n //Variable Declaration pthread_t pthreads[640]; int threadID[640]; - int i=0; + int i=0; int j=0; int rtn=0; ULONGLONG startTicks = 0; @@ -87,7 +87,7 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n char mainFileName[MAX_PATH]; FILE *hMainFile; - //Get perfCallibrationValue + //Get perfCallibrationValue callibrationValue = getPerfCallibrationValue(); printf("Callibration Value for this Platform %llu \n", callibrationValue); @@ -97,7 +97,7 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n if(GetParameters(argc, argv)) { printf("Error in obtaining the parameters\n"); - exit(-1); + exit(-1); } //Assign Values to Application Statistics Members @@ -114,12 +114,12 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n printf("Repeat Count : %d\n", appStats.repeatCount); - //Open file for Application Statistics Collection + //Open file for Application Statistics Collection snprintf(mainFileName, MAX_PATH, "main_nativecriticalsection_%d_.txt",appStats.relationId); hMainFile = fopen(mainFileName, "w+"); if(hMainFile == NULL) - { + { printf("Error in opening main file for write\n"); } @@ -128,14 +128,14 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n { threadID[i] = i; } - + statisticsSize = sizeof(struct statistics); snprintf(fileName, MAX_PATH, "%d_thread_nativecriticalsection_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); hFile = fopen(fileName, "w+"); if(hFile == NULL) - { + { printf("Error in opening file for write for process [%d]\n", USE_PROCESS_COUNT); } @@ -161,12 +161,12 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n } //USE NATIVE METHOD TO GET TICK COUNT - startTicks = GetTicks(); - + startTicks = GetTicks(); + /*Loop to create number THREAD_COUNT number of threads*/ for (i=0;i< THREAD_COUNT;i++) { - + //printf("Creating Thread Count %d\n", i); //printf("Thread arrary value = %d\n", threadID[i]); rtn=pthread_create(&pthreads[i], NULL, waitforworkerthreads, &threadID[i]); @@ -175,10 +175,10 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n printf("Error: pthread Creat, %s \n", strerror(rtn)); exit(-1); } - + } - + //printf("Main Thread waits to recevie signal when all threads are done\n"); pthread_cond_wait(&g_cv2,&g_mutex); @@ -195,7 +195,7 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n printf("Error Broadcasting Conditional Event\n"); exit(-1); } - + //Release the lock if (0!=pthread_mutex_unlock(&g_mutex)) { @@ -220,13 +220,13 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n /*Write Application Results to File*/ //CAPTURE NATIVE TICK COUNT HERE appStats.operationTime = (DWORD)(GetTicks() - startTicks)/callibrationValue; - + /* Write Results to a file*/ if(hFile!= NULL) - { + { for( i = 0; i < THREAD_COUNT; i++ ) - { + { buffer = (struct statistics *)resultBuffer->getResultBuffer(i); fprintf(hFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); //printf("Iteration %d over\n", i); @@ -234,7 +234,7 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n } fclose(hFile); - + //Call Test Case Cleanup Routine if (0!=cleanuptest()) @@ -246,10 +246,10 @@ PALTEST(composite_synchronization_nativecs_interlocked_paltest_synchronization_n if(hMainFile!= NULL) - { - printf("Writing to Main File \n"); + { + printf("Writing to Main File \n"); fprintf(hMainFile, "%lu,%d,%d,%d,%d,%s\n", appStats.operationTime, appStats.relationId, appStats.processCount, appStats.threadCount, appStats.repeatCount, appStats.buildNumber); - + } fclose(hMainFile); return 0; @@ -259,10 +259,10 @@ void * waitforworkerthreads(void * threadId) { int *threadParam = (int*) threadId; - + // printf("Thread ID : %d \n", *threadParam); - - //Accquire Lock + + //Accquire Lock if (0!=pthread_mutex_lock(&g_mutex)) { //Error Condition @@ -272,7 +272,7 @@ void * waitforworkerthreads(void * threadId) //Increment Global Counter GLOBAL_COUNTER++; - + //If global counter is equal to thread count then signal main thread if (GLOBAL_COUNTER == THREAD_COUNT) @@ -301,14 +301,14 @@ void * waitforworkerthreads(void * threadId) exit(-1); } - //Start the test + //Start the test starttests(*threadParam); - + } void starttests(int threadID) { - /*All threads beign executing tests cases*/ + /*All threads beign executing tests cases*/ int i = 0; int Id = threadID; struct statistics stats; @@ -326,10 +326,10 @@ void starttests(int threadID) stats.operationsPassed = 0; stats.operationsTotal = 0; stats.operationTime = 0; - + //Enter and Leave Critical Section in a loop REPEAT_COUNT Times - - + + startTime = GetTicks(); for (i=0;iLogResult(Id, (char *)&stats)) { printf("Error while writing to shared memory, Thread Id is[??] and Process id is [%d]\n", USE_PROCESS_COUNT); } - + } int setuptest(void) { - - //Initalize Critical Section + + //Initialize Critical Section /* if (0!=MTXInitializeCriticalSection( &g_cs)) { @@ -375,11 +375,11 @@ int setuptest(void) int cleanuptest(void) { - + //Delete Critical Section /* if (0!=MTXDeleteCriticalSection(&g_cs)) - { + { return -1; } */ @@ -389,42 +389,42 @@ int cleanuptest(void) int GetParameters( int argc, char **argv) { - if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) + if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) || !strcmp(argv[1],"/h") || !strcmp(argv[1],"/H")) { printf("PAL -Composite Native Critical Section Test\n"); printf("Usage:\n"); - printf("\t[PROCESS_ID ( greater than 1] \n"); - printf("\t[THREAD_COUNT ( greater than 1] \n"); + printf("\t[PROCESS_ID ( greater than 1] \n"); + printf("\t[THREAD_COUNT ( greater than 1] \n"); printf("\t[REPEAT_COUNT ( greater than 1]\n"); - printf("\t[RELATION_ID [greater than or Equal to 1]\n"); + printf("\t[RELATION_ID [greater than or Equal to 1]\n"); return -1; } - - + + USE_PROCESS_COUNT = atoi(argv[1]); - if( USE_PROCESS_COUNT < 0) + if( USE_PROCESS_COUNT < 0) { printf("\nInvalid THREAD_COUNT number, Pass greater than 1\n"); return -1; } THREAD_COUNT = atoi(argv[2]); - if( THREAD_COUNT < 1) + if( THREAD_COUNT < 1) { printf("\nInvalid THREAD_COUNT number, Pass greater than 1\n"); return -1; } REPEAT_COUNT = atoi(argv[3]); - if( REPEAT_COUNT < 1) + if( REPEAT_COUNT < 1) { printf("\nInvalid REPEAT_COUNT number, Pass greater than 1\n"); return -1; } RELATION_ID = atoi(argv[4]); - if( RELATION_ID < 1) + if( RELATION_ID < 1) { printf("\nInvalid RELATION_ID number, Pass greater than 1\n"); return -1; @@ -440,7 +440,7 @@ void incrementCounter(void) } -//Implementation borrowed from pertrace.c +//Implementation borrowed from pertrace.c ULONGLONG GetTicks(void) { #ifdef i386 @@ -459,11 +459,11 @@ ULONGLONG getPerfCallibrationValue(void) { ULONGLONG startTicks; ULONGLONG endTicks; - - startTicks = GetTicks(); + + startTicks = GetTicks(); sleep(1); endTicks = GetTicks(); - + return ((endTicks-startTicks)/1000); //Return number of Ticks in One Milliseconds } diff --git a/src/coreclr/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/pal_except_filter_ex.cpp b/src/coreclr/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/pal_except_filter_ex.cpp index 1b3a05654a8..fb97a8dacba 100644 --- a/src/coreclr/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/pal_except_filter_ex.cpp +++ b/src/coreclr/pal/tests/palsuite/exception_handling/PAL_EXCEPT_FILTER_EX/test2/pal_except_filter_ex.cpp @@ -5,10 +5,10 @@ ** ** Source: PAL_EXCEPT_FILTER_EX.c (test 2) ** -** Purpose: Tests the PAL implementation of the PAL_EXCEPT_FILTER_EX. -** There is a nested try blocks in this test. The nested +** Purpose: Tests the PAL implementation of the PAL_EXCEPT_FILTER_EX. +** There is a nested try blocks in this test. The nested ** PAL_TRY creates an exception and the FILTER creates another. -** This test makes sure that this case does not end in a +** This test makes sure that this case does not end in a ** infinite loop. ** ** @@ -26,7 +26,7 @@ const int nValidator = 12321; LONG Filter_01(EXCEPTION_POINTERS* ep, VOID *pnTestInt) { int nTestInt = *(int *)pnTestInt; - + /* Signal main() that filter has been executed. */ bFilter = TRUE; @@ -60,7 +60,7 @@ PALTEST(exception_handling_PAL_EXCEPT_FILTER_EX_test2_paltest_pal_except_filter_ BOOL bExcept = FALSE; BOOL bExcept2 = FALSE; - /* Initalize the PAL. + /* Initialize the PAL. */ if (0 != PAL_Initialize(argc, argv)) { @@ -69,10 +69,10 @@ PALTEST(exception_handling_PAL_EXCEPT_FILTER_EX_test2_paltest_pal_except_filter_ /* Test a nested PAL_Try block. */ - PAL_TRY + PAL_TRY { /* Signal entry into first PAL_TRY block.*/ - bTry = TRUE; + bTry = TRUE; PAL_TRY { @@ -89,7 +89,7 @@ PALTEST(exception_handling_PAL_EXCEPT_FILTER_EX_test2_paltest_pal_except_filter_ *p = 13; } PAL_ENDTRY - + } PAL_EXCEPT_FILTER(Filter_01, (LPVOID)&nValidator) { @@ -103,7 +103,7 @@ PALTEST(exception_handling_PAL_EXCEPT_FILTER_EX_test2_paltest_pal_except_filter_ Trace("ERROR: The code in the first " "PAL_TRY block was not executed.\n"); } - + if (!bTry2) { Trace("ERROR: The code in the nested " @@ -135,7 +135,7 @@ PALTEST(exception_handling_PAL_EXCEPT_FILTER_EX_test2_paltest_pal_except_filter_ /* Terminate the PAL. */ - PAL_Terminate(); + PAL_Terminate(); return PASS; } diff --git a/src/coreclr/pal/tests/palsuite/file_io/CopyFileA/test4/test4.cpp b/src/coreclr/pal/tests/palsuite/file_io/CopyFileA/test4/test4.cpp index bf3e3ec732b..39cf310c8b8 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/CopyFileA/test4/test4.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/CopyFileA/test4/test4.cpp @@ -6,7 +6,7 @@ ** Source: test4.c ** ** Purpose: Tests the PAL implementation of the CopyFileA function -** to see if a file can through different users belonging to +** to see if a file can through different users belonging to ** different groups. ** @@ -14,7 +14,7 @@ /* USECASE Copy a file from a different user, belonging to a different group to - the the current user, who is a member of the current group. Then check + the current user, who is a member of the current group. Then check to see that the current user has the basic access rights to the copied file. @@ -41,7 +41,7 @@ PALTEST(file_io_CopyFileA_test4_paltest_copyfilea_test4, "file_io/CopyFileA/test HANDLE hFile = NULL; DWORD dwBytesWritten=0; DWORD dwBytesRead=0; - + if (0 != PAL_Initialize(argc,argv)) { return FAIL; @@ -53,13 +53,13 @@ PALTEST(file_io_CopyFileA_test4_paltest_copyfilea_test4, "file_io/CopyFileA/test { Fail("CopyFileA: Cannot copy a file with error, %u",GetLastError()); } - + /* try to get file attributes of destination file */ if (GetFileAttributesA(szDest) == -1) { Fail("CopyFileA: GetFileAttributes of destination file " "failed with error code %u. \n", - GetLastError()); + GetLastError()); } /* set the attributes of the destination file to normal again */ @@ -71,7 +71,7 @@ PALTEST(file_io_CopyFileA_test4_paltest_copyfilea_test4, "file_io/CopyFileA/test } /* open the file for write purposes */ - hFile = CreateFile(szDest, + hFile = CreateFile(szDest, GENERIC_WRITE, 0, NULL, @@ -81,7 +81,7 @@ PALTEST(file_io_CopyFileA_test4_paltest_copyfilea_test4, "file_io/CopyFileA/test if(hFile == INVALID_HANDLE_VALUE) { - Fail("CopyFileA: ERROR -> Unable to create file \"%s\".\n", + Fail("CopyFileA: ERROR -> Unable to create file \"%s\".\n", szDest); } @@ -109,9 +109,9 @@ PALTEST(file_io_CopyFileA_test4_paltest_copyfilea_test4, "file_io/CopyFileA/test ".\n",szDest,GetLastError()); } - + /* open the file for read purposes */ - hFile = CreateFile(szDest, + hFile = CreateFile(szDest, GENERIC_READ, 0, NULL, @@ -121,7 +121,7 @@ PALTEST(file_io_CopyFileA_test4_paltest_copyfilea_test4, "file_io/CopyFileA/test if(hFile == INVALID_HANDLE_VALUE) { - Fail("CopyFileA: ERROR -> Unable to create file \"%s\".\n", + Fail("CopyFileA: ERROR -> Unable to create file \"%s\".\n", szDest); } @@ -153,7 +153,7 @@ PALTEST(file_io_CopyFileA_test4_paltest_copyfilea_test4, "file_io/CopyFileA/test "error %u.\n",szDest, GetLastError()); } Fail(""); - } + } /* Close the file handle */ bRc = CloseHandle(hFile); @@ -169,11 +169,11 @@ PALTEST(file_io_CopyFileA_test4_paltest_copyfilea_test4, "file_io/CopyFileA/test { Fail("CopyFileA: Could not remove copied file with error %u\n", GetLastError()); - } - + } + PAL_Terminate(); return PASS; #endif - + } diff --git a/src/coreclr/pal/tests/palsuite/file_io/CopyFileW/test3/test3.cpp b/src/coreclr/pal/tests/palsuite/file_io/CopyFileW/test3/test3.cpp index e142e72b3ce..733e7a95ae2 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/CopyFileW/test3/test3.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/CopyFileW/test3/test3.cpp @@ -6,7 +6,7 @@ ** Source: test4.c ** ** Purpose: Tests the PAL implementation of the CopyFileW function -** to see if a file can through different users belonging to +** to see if a file can through different users belonging to ** different groups. ** @@ -14,7 +14,7 @@ /* USECASE Copy a file from a different user, belonging to a different group to - the the current user, who is a member of the current group. Then check + the current user, who is a member of the current group. Then check to see that the current user has the basic access rights to the copied file. @@ -43,7 +43,7 @@ PALTEST(file_io_CopyFileW_test3_paltest_copyfilew_test3, "file_io/CopyFileW/test DWORD dwBytesWritten=0; DWORD dwBytesRead=0; int size=0; - + if (0 != PAL_Initialize(argc,argv)) { return FAIL; @@ -55,13 +55,13 @@ PALTEST(file_io_CopyFileW_test3_paltest_copyfilew_test3, "file_io/CopyFileW/test { Fail("CopyFileW: Cannot copy a file with error, %u",GetLastError()); } - + /* try to get file attributes of destination file */ if (GetFileAttributesW(szDest) == -1) { Fail("CopyFileW: GetFileAttributes of destination file " "failed with error code %u. \n", - GetLastError()); + GetLastError()); } /* set the attributes of the destination file to normal again */ @@ -73,7 +73,7 @@ PALTEST(file_io_CopyFileW_test3_paltest_copyfilew_test3, "file_io/CopyFileW/test } /* open the file for write purposes */ - hFile = CreateFileW((WCHAR *)szDest, + hFile = CreateFileW((WCHAR *)szDest, GENERIC_WRITE, 0, NULL, @@ -83,7 +83,7 @@ PALTEST(file_io_CopyFileW_test3_paltest_copyfilew_test3, "file_io/CopyFileW/test if(hFile == INVALID_HANDLE_VALUE) { - Fail("CopyFileW: ERROR -> Unable to create file \"%S\".\n", + Fail("CopyFileW: ERROR -> Unable to create file \"%S\".\n", szDest); } @@ -92,12 +92,12 @@ PALTEST(file_io_CopyFileW_test3_paltest_copyfilew_test3, "file_io/CopyFileW/test size = size*sizeof(WCHAR); /* Attempt to write to the file */ - bRc = WriteFile(hFile, - szStringTest, - size, - &dwBytesWritten, + bRc = WriteFile(hFile, + szStringTest, + size, + &dwBytesWritten, NULL); - + if (!bRc) { Trace("CopyFileW: ERROR -> Unable to write to copied file with error " @@ -120,9 +120,9 @@ PALTEST(file_io_CopyFileW_test3_paltest_copyfilew_test3, "file_io/CopyFileW/test ".\n",szDest,GetLastError()); } - + /* open the file for read purposes */ - hFile = CreateFileW((WCHAR *)szDest, + hFile = CreateFileW((WCHAR *)szDest, GENERIC_READ, 0, NULL, @@ -132,17 +132,17 @@ PALTEST(file_io_CopyFileW_test3_paltest_copyfilew_test3, "file_io/CopyFileW/test if(hFile == INVALID_HANDLE_VALUE) { - Fail("CopyFileW: ERROR -> Unable to create file \"%S\".\n", + Fail("CopyFileW: ERROR -> Unable to create file \"%S\".\n", szDest); } /* Attempt to read from the file */ - bRc = ReadFile(hFile, - szStringRead, - size, - &dwBytesRead, + bRc = ReadFile(hFile, + szStringRead, + size, + &dwBytesRead, NULL); - + if (!bRc) { Trace("CopyFileW: ERROR -> Unable to read from copied file with " @@ -169,7 +169,7 @@ PALTEST(file_io_CopyFileW_test3_paltest_copyfilew_test3, "file_io/CopyFileW/test "error %u.\n",szDest, GetLastError()); } Fail(""); - } + } /* Close the file handle */ bRc = CloseHandle(hFile); @@ -185,11 +185,11 @@ PALTEST(file_io_CopyFileW_test3_paltest_copyfilew_test3, "file_io/CopyFileW/test { Fail("CopyFileW: Could not remove copied file with error %u.\n", GetLastError()); - } - + } + PAL_Terminate(); return PASS; #endif - + } diff --git a/src/coreclr/pal/tests/palsuite/file_io/SearchPathW/test1/SearchPathW.cpp b/src/coreclr/pal/tests/palsuite/file_io/SearchPathW/test1/SearchPathW.cpp index a14cd04115f..7b61e753e94 100644 --- a/src/coreclr/pal/tests/palsuite/file_io/SearchPathW/test1/SearchPathW.cpp +++ b/src/coreclr/pal/tests/palsuite/file_io/SearchPathW/test1/SearchPathW.cpp @@ -123,7 +123,7 @@ PALTEST(file_io_SearchPathW_test1_paltest_searchpathw_test1, "file_io/SearchPath return FAIL; } - /* Initalize the buffer. + /* Initialize the buffer. */ memset(fullPath, 0, _MAX_DIR); diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp index 93363488bc6..e8db6ca4bcc 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test6/loadlibrarya.cpp @@ -77,7 +77,7 @@ PALTEST(loader_LoadLibraryA_test6_paltest_loadlibrarya_test6, "loader/LoadLibrar return (FAIL); } - /* Initalize the buffer. + /* Initialize the buffer. */ memset(fullPath, 0, _MAX_DIR); diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp index 1bbf9a6d08a..3276bc5a703 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test8/loadlibrarya.cpp @@ -82,7 +82,7 @@ PALTEST(loader_LoadLibraryA_test8_paltest_loadlibrarya_test8, "loader/LoadLibrar return (FAIL); } - /* Initalize the buffer. + /* Initialize the buffer. */ memset(fullPath, 0, _MAX_DIR); diff --git a/src/coreclr/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/CreateMutexW.cpp b/src/coreclr/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/CreateMutexW.cpp index 1e4ca6c93c5..4c8d0bea83a 100644 --- a/src/coreclr/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/CreateMutexW.cpp +++ b/src/coreclr/pal/tests/palsuite/threading/CreateMutexW_ReleaseMutex/test2/CreateMutexW.cpp @@ -25,7 +25,7 @@ ** CloseHandle ** Sleep ** memset -** +** ** **=========================================================*/ @@ -123,7 +123,7 @@ PALTEST(threading_CreateMutexW_ReleaseMutex_test2_paltest_createmutexw_releasemu /* * Testing Function * - * Try to get multiple handles to a named Mutex and test + * Try to get multiple handles to a named Mutex and test * to make sure they actually refer to same Mutex object. */ BOOL TestNamedMutex_CreateMutexW_ReleaseMutex_test2(const char *szMutexName) @@ -159,10 +159,10 @@ BOOL TestNamedMutex_CreateMutexW_ReleaseMutex_test2(const char *szMutexName) /* We have to call ReleaseMutex here because of the Wait */ if (ReleaseMutex(hMutex1) == FALSE) { - Trace("ReleaseMutex Failed.\n"); + Trace("ReleaseMutex Failed.\n"); return FALSE; } - + /* Get a second handle to the same mutex */ hMutex2 = CreateMutexW (NULL, FALSE, swzMutexName); @@ -174,7 +174,7 @@ BOOL TestNamedMutex_CreateMutexW_ReleaseMutex_test2(const char *szMutexName) return FALSE; } - /* Get rid of the wide character string */ + /* Get rid of the wide character string */ free(swzMutexName); /* @@ -194,10 +194,10 @@ BOOL TestNamedMutex_CreateMutexW_ReleaseMutex_test2(const char *szMutexName) /* Give the thread a little time to execute & wait*/ Sleep(500); - /* Signal the the first handle */ + /* Signal the first handle */ if (ReleaseMutex(hMutex1) == FALSE) { - Trace("ReleaseMutex Failed.\n"); + Trace("ReleaseMutex Failed.\n"); return FALSE; } @@ -326,7 +326,7 @@ BOOL NegativeReleaseMutexTests_CreateMutexW_ReleaseMutex_test2() Trace("Error: CloseHandle failed.\n"); bResults = FALSE; } - + bRet = ReleaseMutex(hMutex); if (bRet != FALSE) diff --git a/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test1/test1.cpp index 241499e4d1c..654b257bdbe 100644 --- a/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test1/test1.cpp @@ -7,8 +7,8 @@ ** ** Purpose: Tests the PAL implementation of the DuplicateHandle function. ** This test will create two handles to file, one to write and -** one to read what was written. Test on a closed handle and a -** NULL handle, both should fail. +** one to read what was written. Test on a closed handle and a +** NULL handle, both should fail. ** ** **===================================================================*/ @@ -25,7 +25,7 @@ PALTEST(threading_DuplicateHandle_test1_paltest_duplicatehandle_test1, "threadin DWORD dwBytesRead; BOOL bRetVal; - /*Initalize the PAL*/ + /*Initialize the PAL*/ if ((PAL_Initialize(argc,argv)) != 0) { return (FAIL); @@ -35,9 +35,9 @@ PALTEST(threading_DuplicateHandle_test1_paltest_duplicatehandle_test1, "threadin hFile = CreateFile(lpFileName, GENERIC_WRITE|GENERIC_READ, FILE_SHARE_WRITE|FILE_SHARE_READ, - NULL, + NULL, OPEN_ALWAYS, - FILE_ATTRIBUTE_NORMAL, + FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { @@ -46,7 +46,7 @@ PALTEST(threading_DuplicateHandle_test1_paltest_duplicatehandle_test1, "threadin lpFileName); } - /*Write test string to the file.*/ + /*Write test string to the file.*/ bRetVal = WriteFile(hFile, // handle to file teststr, // data buffer strlen(teststr), // number of bytes to write @@ -65,12 +65,12 @@ PALTEST(threading_DuplicateHandle_test1_paltest_duplicatehandle_test1, "threadin /*Create a duplicate handle with DuplicateHandle.*/ if (!(DuplicateHandle( - GetCurrentProcess(), + GetCurrentProcess(), hFile, - GetCurrentProcess(), + GetCurrentProcess(), &hDupFile, GENERIC_READ|GENERIC_WRITE, - FALSE, + FALSE, DUPLICATE_SAME_ACCESS))) { Trace("ERROR: %u : Fail to create the duplicate handle" @@ -115,12 +115,12 @@ PALTEST(threading_DuplicateHandle_test1_paltest_duplicatehandle_test1, "threadin /*Failure test: Create DuplicateHandle to a closed handle*/ if ((DuplicateHandle( - GetCurrentProcess(), + GetCurrentProcess(), hFile, - GetCurrentProcess(), + GetCurrentProcess(), &hDupFile, GENERIC_READ|GENERIC_WRITE, - FALSE, + FALSE, DUPLICATE_SAME_ACCESS))) { Fail("ERROR: %u :Created a duplicate handle to" @@ -137,11 +137,11 @@ PALTEST(threading_DuplicateHandle_test1_paltest_duplicatehandle_test1, "threadin GetCurrentProcess(), &hDupFile, GENERIC_READ|GENERIC_WRITE, - FALSE, + FALSE, DUPLICATE_SAME_ACCESS))) { Fail("ERROR: %u :Created a duplicate handle to " - " a NULL handle hFile=0x%lx\n", + " a NULL handle hFile=0x%lx\n", GetLastError(), hFile); } diff --git a/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test12/test12.cpp b/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test12/test12.cpp index 9711a3375ed..5a476b2d9ed 100644 --- a/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test12/test12.cpp +++ b/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test12/test12.cpp @@ -7,7 +7,7 @@ ** ** Purpose: Tests the PAL implementation of the DuplicateHandle function. ** This test will create handle to file (to write) and close it, -** then call duplicate handle to read what was written. +** then call duplicate handle to read what was written. ** ** **===================================================================*/ @@ -24,7 +24,7 @@ PALTEST(threading_DuplicateHandle_test12_paltest_duplicatehandle_test12, "thread DWORD dwBytesRead; BOOL bRetVal; - /*Initalize the PAL*/ + /*Initialize the PAL*/ if ((PAL_Initialize(argc,argv)) != 0) { return (FAIL); @@ -34,9 +34,9 @@ PALTEST(threading_DuplicateHandle_test12_paltest_duplicatehandle_test12, "thread hFile = CreateFile(lpFileName, GENERIC_WRITE|GENERIC_READ, FILE_SHARE_WRITE|FILE_SHARE_READ, - NULL, + NULL, OPEN_ALWAYS, - FILE_ATTRIBUTE_NORMAL, + FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { @@ -45,7 +45,7 @@ PALTEST(threading_DuplicateHandle_test12_paltest_duplicatehandle_test12, "thread lpFileName); } - /*Write test string to the file.*/ + /*Write test string to the file.*/ bRetVal = WriteFile(hFile, // handle to file teststr, // data buffer strlen(teststr), // number of bytes to write @@ -64,12 +64,12 @@ PALTEST(threading_DuplicateHandle_test12_paltest_duplicatehandle_test12, "thread /*Create a duplicate handle with DuplicateHandle.*/ if (!(DuplicateHandle( - GetCurrentProcess(), + GetCurrentProcess(), hFile, - GetCurrentProcess(), + GetCurrentProcess(), &hDupFile, GENERIC_READ|GENERIC_WRITE, - FALSE, + FALSE, DUPLICATE_SAME_ACCESS))) { Trace("ERROR: %u : Fail to create the duplicate handle" @@ -84,7 +84,7 @@ PALTEST(threading_DuplicateHandle_test12_paltest_duplicatehandle_test12, "thread { Fail("Duplicate Handle:Unable to close original file: Error[%u]\n", GetLastError()); } - + memset(buf, 0, 256); /*Read from the Duplicated handle.*/ @@ -110,7 +110,7 @@ PALTEST(threading_DuplicateHandle_test12_paltest_duplicatehandle_test12, "thread CloseHandle(hDupFile); Fail(""); } - + /*Close the handles*/ CloseHandle(hDupFile); diff --git a/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test2/test2.cpp b/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test2/test2.cpp index ed766202189..71abd9d95d8 100644 --- a/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test2/test2.cpp +++ b/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test2/test2.cpp @@ -10,7 +10,7 @@ ** event in a signaled state to wait, and then set the duplicate ** to nonsignaled state and perform the wait again. The wait on ** the event should fail. Test the duplication of closed and NULL -** events, these should fail. +** events, these should fail. ** ** **===================================================================*/ @@ -21,7 +21,7 @@ PALTEST(threading_DuplicateHandle_test2_paltest_duplicatehandle_test2, "threadin HANDLE hEvent; HANDLE hDupEvent; - /*Initalize the PAL.*/ + /*Initialize the PAL.*/ if ((PAL_Initialize(argc,argv)) != 0) { return (FAIL); @@ -31,7 +31,7 @@ PALTEST(threading_DuplicateHandle_test2_paltest_duplicatehandle_test2, "threadin hEvent = CreateEvent(0, TRUE, TRUE, 0); if (hEvent == NULL) { - Fail("ERROR: %u :unable to create event\n", + Fail("ERROR: %u :unable to create event\n", GetLastError()); } diff --git a/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test9/test9.cpp b/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test9/test9.cpp index e5a0abcc6cf..1d5c3f11fee 100644 --- a/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test9/test9.cpp +++ b/src/coreclr/pal/tests/palsuite/threading/DuplicateHandle/test9/test9.cpp @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. /*===================================================================== -** +** ** Source: test9.c (DuplicateHandle) ** ** Purpose: Tests the PAL implementation of the DuplicateHandle function, -** with a handle from GetCurrentProcess. The test will create a +** with a handle from GetCurrentProcess. The test will create a ** process, duplicate it, then using ReadProcessMemory will ** read from the memory location of the CreateProcess process -** memory and the DuplicateHandle process memory. If the +** memory and the DuplicateHandle process memory. If the ** duplication is correct the memory will be the same for both. ** ** @@ -27,18 +27,18 @@ PALTEST(threading_DuplicateHandle_test9_paltest_duplicatehandle_test9, "threadin SIZE_T lpDupNumberOfBytesRead; char lpTestBuffer[] = "abcdefghijklmnopqrstuvwxyz"; - /* Initalize the PAL. + /* Initialize the PAL. */ if(0 != (PAL_Initialize(argc, argv))) { return FAIL; } - - /* Initalize the buffers. + + /* Initialize the buffers. */ ZeroMemory( &lpBuffer, sizeof(lpBuffer) ); ZeroMemory( &lpDupBuffer, sizeof(lpDupBuffer) ); - + /* Get current proces, this will be duplicated. */ hProcess = GetCurrentProcess(); @@ -67,18 +67,18 @@ PALTEST(threading_DuplicateHandle_test9_paltest_duplicatehandle_test9, "threadin /* Get memory read of the current process. */ - if ((ReadProcessMemory(hDupProcess, &lpTestBuffer, + if ((ReadProcessMemory(hDupProcess, &lpTestBuffer, lpDupBuffer, sizeof(lpDupBuffer), &lpDupNumberOfBytesRead)) == 0) { Trace("ERROR:%u: Unable to read the process memory of " - "hDupProcess=0x%lx.\n", - GetLastError(), + "hDupProcess=0x%lx.\n", + GetLastError(), hDupProcess); CloseHandle(hProcess); CloseHandle(hDupProcess); Fail(""); } - + /* Get read memory of the created process. */ if ((ReadProcessMemory(hProcess, &lpTestBuffer, @@ -86,7 +86,7 @@ PALTEST(threading_DuplicateHandle_test9_paltest_duplicatehandle_test9, "threadin { Trace("ERROR:%u: Unable to read the process memory of " "hProcess=0x%lx.\n", - GetLastError(), + GetLastError(), hProcess); CloseHandle(hProcess); CloseHandle(hDupProcess); @@ -117,7 +117,7 @@ PALTEST(threading_DuplicateHandle_test9_paltest_duplicatehandle_test9, "threadin CloseHandle(hDupProcess); Fail(""); } - + /* Clean-up thread and Terminate the PAL.*/ CloseHandle(hProcess); CloseHandle(hDupProcess); diff --git a/src/coreclr/scripts/antigen_summarize.py b/src/coreclr/scripts/antigen_summarize.py index 8f9051cc6ab..b597893fd60 100644 --- a/src/coreclr/scripts/antigen_summarize.py +++ b/src/coreclr/scripts/antigen_summarize.py @@ -68,7 +68,7 @@ def setup_args(args): def extract_assertion_error(text): """ Extract assertion error from stderr output - + Args: text (string): The text that might contain an assertion Returns: @@ -144,9 +144,9 @@ def print_unique_issues_summary(issues_directory, platform, arch, build_config): if len(issues_by_assert) > 0: f.write("# {} distinct assertion errors seen\n".format(len(issues_by_assert))) for message, issues in sorted(issues_by_assert.items(), key=lambda p: len(p[1]), reverse=True): - f.write("## ({} occurences) {}\n".format(len(issues), message)) + f.write("## ({} occurrences) {}\n".format(len(issues), message)) (partition, issue) = issues[0] - f.write("Example occurence from {}:\n".format(partition)) + f.write("Example occurrence from {}:\n".format(partition)) f.write("```scala\n") f.write(issue.strip() + "\n") f.write("```\n\n") @@ -154,8 +154,8 @@ def print_unique_issues_summary(issues_directory, platform, arch, build_config): if len(remaining_issues) > 0: f.write("# {} uncategorized issues found\n".format(len(remaining_issues))) # Turned off since the output does not seem particularly useful -# for issue, occurences in sorted(remaining_issues.items(), key=lambda p: p[1], reverse=True): -# f.write("## {} occurences\n".format(occurences)) +# for issue, occurrences in sorted(remaining_issues.items(), key=lambda p: p[1], reverse=True): +# f.write("## {} occurrences\n".format(occurrences)) # f.write("```scala\n") # f.write(issue.strip() + "\n") # f.write("```\n\n") diff --git a/src/coreclr/scripts/fuzzlyn_summarize.py b/src/coreclr/scripts/fuzzlyn_summarize.py index 3a7f1cfe0e3..8f2d1f7da66 100644 --- a/src/coreclr/scripts/fuzzlyn_summarize.py +++ b/src/coreclr/scripts/fuzzlyn_summarize.py @@ -69,7 +69,7 @@ def setup_args(args): def extract_assertion_error(text): """ Extract assertion error from stderr output - + Args: text (string): The text that might contain an assertion Returns: @@ -202,9 +202,9 @@ def main(main_args): if len(crashes_by_assert) > 0: f.write("# {} distinct assertion errors seen\n".format(len(crashes_by_assert))) for error, examples in sorted(crashes_by_assert.items(), key=lambda p: len(p[1]), reverse=True): - f.write("## ({} occurences) {}\n".format(len(examples), error)) + f.write("## ({} occurrences) {}\n".format(len(examples), error)) if len(examples) > 1: - f.write("Example occurence:\n") + f.write("Example occurrence:\n") f.write("```scala\n") f.write(examples[0]['Message'].strip() + "\n") f.write("```\n") diff --git a/src/coreclr/tools/Common/Compiler/DevirtualizationManager.cs b/src/coreclr/tools/Common/Compiler/DevirtualizationManager.cs index f7bd609553f..c3164265766 100644 --- a/src/coreclr/tools/Common/Compiler/DevirtualizationManager.cs +++ b/src/coreclr/tools/Common/Compiler/DevirtualizationManager.cs @@ -159,7 +159,7 @@ namespace ILCompiler } else { - // The derived class should be a subclass of the the base class. + // The derived class should be a subclass of the base class. // this check is perfomed via typedef checking instead of casting, as we accept canon methods calling exact types TypeDesc checkType; for (checkType = implType; checkType != null && !checkType.HasSameTypeDefinition(declMethod.OwningType); checkType = checkType.BaseType) @@ -167,7 +167,7 @@ namespace ILCompiler if ((checkType == null) || (checkType.ConvertToCanonForm(CanonicalFormKind.Specific) != declMethod.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific))) { - // The derived class should be a subclass of the the base class. + // The derived class should be a subclass of the base class. devirtualizationDetail = CORINFO_DEVIRTUALIZATION_DETAIL.CORINFO_DEVIRTUALIZATION_FAILED_SUBCLASS; return null; } diff --git a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/Generator/PublicGen.cs b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/Generator/PublicGen.cs index 779be88aef3..178d10e3699 100644 --- a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/Generator/PublicGen.cs +++ b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/Generator/PublicGen.cs @@ -58,7 +58,7 @@ class PublicGen : CsWriter } // - // HandleType enum is not the the schema + // HandleType enum is not the schema // EmitEnum( new RecordDef( diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs index a91a2531a42..9a173957fa0 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs @@ -518,7 +518,7 @@ namespace Internal.JitInterface // but need to insert a callout to the VM to ask during runtime // whether to raise a verification or not (if the method is unverifiable). CORINFO_VERIFICATION_DONT_JIT = 3, // Cannot skip verification during jit time, - // but do not jit the method if is is unverifiable. + // but do not jit the method if it is unverifiable. } public enum CorInfoInitClassResult diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt index 74e786a995b..964eebcfcc0 100644 --- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt +++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt @@ -30,7 +30,7 @@ ; Also, note that an empty line is ignored, and a line that begins with a ; is ignored. ; ; If the boilerplate around the individual functions needs adjustment, edit the thunk generator source code, and -; rebuild with rebuildthunkgen.cmd in the the ThunkGenerator subdir, then rebuildthunks.cmd +; rebuild with rebuildthunkgen.cmd in the ThunkGenerator subdir, then rebuildthunks.cmd ; If this file is editted, rebuild with gen.cmd -- DO NOT RUN from within a razzle window. ; NORMALTYPES diff --git a/src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs b/src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs index ccddbb35dd4..a10e3589daf 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs @@ -193,7 +193,7 @@ namespace Internal.TypeSystem /// /// Resolves interface method '' to a method on '' - /// that implements the the method. + /// that implements the method. /// public static MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(this TypeDesc type, MethodDesc interfaceMethod) { diff --git a/src/coreclr/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs b/src/coreclr/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs index 804ab398b3a..d021afc2bc2 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/VirtualMethodAlgorithm.cs @@ -18,7 +18,7 @@ namespace Internal.TypeSystem { /// /// Resolves interface method '' to a method on '' - /// that implements the the method. + /// that implements the method. /// public abstract MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); diff --git a/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin.cpp b/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin.cpp index 9b9601fbb97..724f69892f6 100644 --- a/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin.cpp +++ b/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin.cpp @@ -591,7 +591,7 @@ void Usage() printf("\n"); printf(" -l:,,... : print messages at dprint level1,level2,...\n"); printf("\n"); - printf(" -g:: only print messages occuring during GC#gc_index\n"); + printf(" -g:: only print messages occurring during GC#gc_index\n"); printf(" -g:-: as above, for a range of GC indices\n"); printf("\n"); printf(" -f: print the raw format strings along with the message\n"); diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/LibraryInitializers.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/LibraryInitializers.cs index 2cb61913079..2ecc94f3b0c 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/LibraryInitializers.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/LibraryInitializers.cs @@ -23,10 +23,10 @@ namespace ILCompiler private readonly TypeSystemContext _context; private IReadOnlyCollection _librariesWithInitializers; - public LibraryInitializers(TypeSystemContext context, IEnumerable librariesWithInitalizers) + public LibraryInitializers(TypeSystemContext context, IEnumerable librariesWithInitializers) { _context = context; - _librariesWithInitializers = new List(librariesWithInitalizers); + _librariesWithInitializers = new List(librariesWithInitializers); } public IReadOnlyCollection LibraryInitializerMethods @@ -43,7 +43,7 @@ namespace ILCompiler private void InitLibraryInitializers() { Debug.Assert(_libraryInitializerMethods == null); - + _libraryInitializerMethods = new List(); foreach (var assembly in _librariesWithInitializers) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MethodImportationErrorProvider.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MethodImportationErrorProvider.cs index 2a5fae99b76..eea09a404c5 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MethodImportationErrorProvider.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MethodImportationErrorProvider.cs @@ -6,7 +6,7 @@ using Internal.TypeSystem; namespace ILCompiler { /// - /// Class that provides cached information about method body importation errors that occured in previous phases. + /// Class that provides cached information about method body importation errors that occurred in previous phases. /// public class MethodImportationErrorProvider { diff --git a/src/coreclr/tools/aot/ILCompiler/Program.cs b/src/coreclr/tools/aot/ILCompiler/Program.cs index 4d30c1cd4f5..91f149e063a 100644 --- a/src/coreclr/tools/aot/ILCompiler/Program.cs +++ b/src/coreclr/tools/aot/ILCompiler/Program.cs @@ -347,17 +347,17 @@ namespace ILCompiler private IReadOnlyCollection CreateInitializerList(CompilerTypeSystemContext context) { - List assembliesWithInitalizers = new List(); + List assembliesWithInitializers = new List(); // Build a list of assemblies that have an initializer that needs to run before // any user code runs. foreach (string initAssemblyName in _initAssemblies) { ModuleDesc assembly = context.ResolveAssembly(new AssemblyName(initAssemblyName), throwIfNotFound: true); - assembliesWithInitalizers.Add(assembly); + assembliesWithInitializers.Add(assembly); } - var libraryInitializers = new LibraryInitializers(context, assembliesWithInitalizers); + var libraryInitializers = new LibraryInitializers(context, assembliesWithInitializers); List initializerList = new List(libraryInitializers.LibraryInitializerMethods); @@ -537,7 +537,7 @@ namespace ILCompiler var simdVectorLength = instructionSetSupport.GetVectorTSimdVector(); var targetAbi = TargetAbi.NativeAot; var targetDetails = new TargetDetails(_targetArchitecture, _targetOS, targetAbi, simdVectorLength); - CompilerTypeSystemContext typeSystemContext = + CompilerTypeSystemContext typeSystemContext = new CompilerTypeSystemContext(targetDetails, genericsMode, supportsReflection ? DelegateFeature.All : 0, _maxGenericCycle); // @@ -546,7 +546,7 @@ namespace ILCompiler // // See: https://github.com/dotnet/corert/issues/2785 // - // When we undo this this hack, replace this foreach with + // When we undo this hack, replace the foreach with // typeSystemContext.InputFilePaths = _inputFilePaths; // Dictionary inputFilePaths = new Dictionary(); diff --git a/src/coreclr/tools/aot/ILLink.Shared/SharedStrings.resx b/src/coreclr/tools/aot/ILLink.Shared/SharedStrings.resx index fe39e389065..cdcb30468f3 100644 --- a/src/coreclr/tools/aot/ILLink.Shared/SharedStrings.resx +++ b/src/coreclr/tools/aot/ILLink.Shared/SharedStrings.resx @@ -1,17 +1,17 @@  - @@ -135,7 +135,7 @@ Error processing '{0}': {1}. - An error ocurred while processing a method in assembly. + An error occurred while processing a method in assembly. Error processing method '{0}' in assembly '{1}'. diff --git a/src/coreclr/tools/aot/crossgen2/Program.cs b/src/coreclr/tools/aot/crossgen2/Program.cs index 6cb715cc2ca..6f9a1f23849 100644 --- a/src/coreclr/tools/aot/crossgen2/Program.cs +++ b/src/coreclr/tools/aot/crossgen2/Program.cs @@ -402,7 +402,7 @@ namespace ILCompiler // // See: https://github.com/dotnet/corert/issues/2785 // - // When we undo this this hack, replace this foreach with + // When we undo this hack, replace the foreach with // typeSystemContext.InputFilePaths = inFilePaths; // diff --git a/src/coreclr/unwinder/amd64/dbs_stack_x64.cpp b/src/coreclr/unwinder/amd64/dbs_stack_x64.cpp index 71b53610035..fe52cfea49e 100644 --- a/src/coreclr/unwinder/amd64/dbs_stack_x64.cpp +++ b/src/coreclr/unwinder/amd64/dbs_stack_x64.cpp @@ -223,7 +223,7 @@ Arguments: break; // - // Establish the the frame pointer register. + // Establish the frame pointer register. // // The operation information is not used. // diff --git a/src/coreclr/unwinder/amd64/unwinder_amd64.cpp b/src/coreclr/unwinder/amd64/unwinder_amd64.cpp index 127fde33c07..638e6d45ca7 100644 --- a/src/coreclr/unwinder/amd64/unwinder_amd64.cpp +++ b/src/coreclr/unwinder/amd64/unwinder_amd64.cpp @@ -304,7 +304,7 @@ UNWIND_INFO * OOPStackUnwinderAMD64::GetUnwindInfo(TADDR taUnwindInfo) // ContextRecord - Supplies the address of a context record. // // HandlerData - Supplies a pointer to a variable that receives a pointer -// the the language handler data. +// the language handler data. // // EstablisherFrame - Supplies a pointer to a variable that receives the // the establisher frame pointer value. @@ -794,7 +794,7 @@ Return Value: break; // - // Establish the the frame pointer register. + // Establish the frame pointer register. // // The operation information is not used. // @@ -807,7 +807,7 @@ Return Value: #ifdef TARGET_UNIX // - // Establish the the frame pointer register using a large size displacement. + // Establish the frame pointer register using a large size displacement. // UNWIND_INFO.FrameOffset must be 15 (the maximum value, corresponding to a scaled // offset of 15 * 16 == 240). The next two codes contain a 32-bit offset, which // is also scaled by 16, since the stack must remain 16-bit aligned. @@ -1054,7 +1054,7 @@ Arguments: HandlerData - Supplies a pointer to a variable that receives a pointer - the the language handler data. + the language handler data. EstablisherFrame - Supplies a pointer to a variable that receives the the establisher frame pointer value. diff --git a/src/coreclr/unwinder/arm/unwinder_arm.cpp b/src/coreclr/unwinder/arm/unwinder_arm.cpp index 5ba057cbcd6..6cccc7a65cc 100644 --- a/src/coreclr/unwinder/arm/unwinder_arm.cpp +++ b/src/coreclr/unwinder/arm/unwinder_arm.cpp @@ -970,7 +970,7 @@ Arguments: returned. HandlerData - Supplies a pointer to a variable that receives a pointer - the the language handler data. + the language handler data. UnwindParams - Additional parameters shared with caller. diff --git a/src/coreclr/unwinder/arm64/unwinder_arm64.cpp b/src/coreclr/unwinder/arm64/unwinder_arm64.cpp index e037c3ab209..60ff842a5d7 100644 --- a/src/coreclr/unwinder/arm64/unwinder_arm64.cpp +++ b/src/coreclr/unwinder/arm64/unwinder_arm64.cpp @@ -636,7 +636,7 @@ Arguments: returned. HandlerData - Supplies a pointer to a variable that receives a pointer - the the language handler data. + the language handler data. UnwindParams - Additional parameters shared with caller. @@ -1269,7 +1269,7 @@ Arguments: returned. HandlerData - Supplies a pointer to a variable that receives a pointer - the the language handler data. + the language handler data. UnwindParams - Additional parameters shared with caller. diff --git a/src/coreclr/unwinder/i386/unwinder_i386.cpp b/src/coreclr/unwinder/i386/unwinder_i386.cpp index e1294c8afbd..f4af20e86ef 100644 --- a/src/coreclr/unwinder/i386/unwinder_i386.cpp +++ b/src/coreclr/unwinder/i386/unwinder_i386.cpp @@ -81,7 +81,7 @@ Arguments: HandlerData - Supplies a pointer to a variable that receives a pointer - the the language handler data. + the language handler data. EstablisherFrame - Supplies a pointer to a variable that receives the the establisher frame pointer value. @@ -169,7 +169,7 @@ BOOL DacUnwindStackFrame(T_CONTEXT* pContextRecord, T_KNONVOLATILE_CONTEXT_POINT // ContextRecord - Supplies the address of a context record. // // HandlerData - Supplies a pointer to a variable that receives a pointer -// the the language handler data. +// the language handler data. // // EstablisherFrame - Supplies a pointer to a variable that receives the // the establisher frame pointer value. diff --git a/src/coreclr/unwinder/loongarch64/unwinder_loongarch64.cpp b/src/coreclr/unwinder/loongarch64/unwinder_loongarch64.cpp index 0a8afdb1df3..fe8cbc8e636 100644 --- a/src/coreclr/unwinder/loongarch64/unwinder_loongarch64.cpp +++ b/src/coreclr/unwinder/loongarch64/unwinder_loongarch64.cpp @@ -608,7 +608,7 @@ Arguments: returned. HandlerData - Supplies a pointer to a variable that receives a pointer - the the language handler data. + the language handler data. UnwindParams - Additional parameters shared with caller. @@ -1068,7 +1068,7 @@ Arguments: returned. HandlerData - Supplies a pointer to a variable that receives a pointer - the the language handler data. + the language handler data. UnwindParams - Additional parameters shared with caller. diff --git a/src/coreclr/utilcode/executableallocator.cpp b/src/coreclr/utilcode/executableallocator.cpp index 197ce6e8e69..8a1614e080f 100644 --- a/src/coreclr/utilcode/executableallocator.cpp +++ b/src/coreclr/utilcode/executableallocator.cpp @@ -195,7 +195,7 @@ void ExecutableAllocator::ResetLazyPreferredRangeHint() g_lazyPreferredRangeHint = g_lazyPreferredRangeStart; #endif } -// Returns TRUE if p is is located in the memory area where we prefer to put +// Returns TRUE if p is located in the memory area where we prefer to put // executable code and static fields. This area is typically close to the // coreclr library. bool ExecutableAllocator::IsPreferredExecutableRange(void * p) @@ -285,7 +285,7 @@ void ExecutableAllocator::UpdateCachedMapping(BlockRW* pBlock) m_cachedMapping = pBlock; pBlock->refCount++; } -#endif // ENABLE_CACHED_MAPPINGS +#endif // ENABLE_CACHED_MAPPINGS } void* ExecutableAllocator::FindRWBlock(void* baseRX, size_t size) @@ -584,7 +584,7 @@ void* ExecutableAllocator::ReserveWithinRange(size_t size, const void* loAddress block->baseRX = result; AddRXBlock(block); } - else + else { BackoutBlock(block, isFreeBlock); } @@ -676,7 +676,7 @@ void* ExecutableAllocator::Reserve(size_t size) block->baseRX = result; AddRXBlock(block); } - else + else { BackoutBlock(block, isFreeBlock); } @@ -727,7 +727,7 @@ void* ExecutableAllocator::ReserveAt(void* baseAddressRX, size_t size) block->baseRX = result; AddRXBlock(block); } - else + else { BackoutBlock(block, isFreeBlock); } diff --git a/src/coreclr/utilcode/stresslog.cpp b/src/coreclr/utilcode/stresslog.cpp index 0d6f4cd53c9..6bb8229d804 100644 --- a/src/coreclr/utilcode/stresslog.cpp +++ b/src/coreclr/utilcode/stresslog.cpp @@ -60,7 +60,7 @@ unsigned __int64 getTimeStamp() { #if defined(HOST_X86) && !defined(HOST_UNIX) /*********************************************************************************/ -/* Get the the frequency cooresponding to 'getTimeStamp'. For x86, this is the +/* Get the frequency cooresponding to 'getTimeStamp'. For x86, this is the frequency of the RDTSC instruction, which is just the clock rate of the CPU. This can vary due to power management, so this is at best a rough approximation. */ @@ -108,7 +108,7 @@ unsigned __int64 getTickFrequency() /*********************************************************************************/ -/* Get the the frequency cooresponding to 'getTimeStamp'. For non-x86 +/* Get the frequency cooresponding to 'getTimeStamp'. For non-x86 architectures, this is just the performance counter frequency. */ unsigned __int64 getTickFrequency() @@ -899,14 +899,14 @@ void StressLog::LogMsg(unsigned level, unsigned facility, const StressLogMsg &ms if (msgs == 0) return; } -#ifdef HOST_WINDOWS +#ifdef HOST_WINDOWS // On Linux, this cast: (va_list)msg.m_args gives a compile error msgs->LogMsg(facility, msg.m_cArgs, msg.m_format, (va_list)msg.m_args); #else - msgs->LogMsg(facility, msg.m_cArgs, msg.m_format, - msg.m_args[0], msg.m_args[1], msg.m_args[2], msg.m_args[3], - msg.m_args[4], msg.m_args[5], msg.m_args[6], msg.m_args[7], - msg.m_args[8], msg.m_args[9], msg.m_args[10], msg.m_args[11], + msgs->LogMsg(facility, msg.m_cArgs, msg.m_format, + msg.m_args[0], msg.m_args[1], msg.m_args[2], msg.m_args[3], + msg.m_args[4], msg.m_args[5], msg.m_args[6], msg.m_args[7], + msg.m_args[8], msg.m_args[9], msg.m_args[10], msg.m_args[11], msg.m_args[12], msg.m_args[13], msg.m_args[14], msg.m_args[15]); #endif //HOST_WINDOWS } @@ -966,7 +966,7 @@ void* __cdecl ThreadStressLog::operator new(size_t n, const NoThrow&) NOEXCEPT #endif //HOST_WINDOWS } -void __cdecl ThreadStressLog::operator delete(void* p) +void __cdecl ThreadStressLog::operator delete(void* p) { if (StressLogChunk::s_memoryMapped) return; // Giving up, we will just leak it instead of building a sophisticated allocator diff --git a/src/coreclr/vm/amd64/RedirectedHandledJITCase.asm b/src/coreclr/vm/amd64/RedirectedHandledJITCase.asm index fa04e3689aa..6dededa9ab0 100644 --- a/src/coreclr/vm/amd64/RedirectedHandledJITCase.asm +++ b/src/coreclr/vm/amd64/RedirectedHandledJITCase.asm @@ -21,7 +21,7 @@ extern FixRedirectContextHandler:proc ; WARNING!! restoring the context prior to any stackwalk. This means that ; WARNING!! we need to ensure that no GC can occur while the stack is ; WARNING!! unwalkable. This further means that we cannot allow any exception -; WARNING!! to occure when the stack is unwalkable +; WARNING!! to occur when the stack is unwalkable ; diff --git a/src/coreclr/vm/amd64/gmscpu.h b/src/coreclr/vm/amd64/gmscpu.h index 31e758d8608..985a8c1c9f5 100644 --- a/src/coreclr/vm/amd64/gmscpu.h +++ b/src/coreclr/vm/amd64/gmscpu.h @@ -176,7 +176,7 @@ inline void LazyMachState::setLazyStateFromUnwind(MachState* copy) EXTERN_C void LazyMachStateCaptureState(struct LazyMachState *pState); // CAPTURE_STATE captures just enough register state so that the state of the -// processor can be deterined just after the the routine that has CAPTURE_STATE in +// processor can be deterined just after the routine that has CAPTURE_STATE in // it returns. #define CAPTURE_STATE(machState, ret) \ diff --git a/src/coreclr/vm/appdomain.cpp b/src/coreclr/vm/appdomain.cpp index 1129bcdec1d..e8531d7bc42 100644 --- a/src/coreclr/vm/appdomain.cpp +++ b/src/coreclr/vm/appdomain.cpp @@ -5092,8 +5092,8 @@ HRESULT RuntimeInvokeHostAssemblyResolver(INT_PTR pManagedAssemblyLoadContextToB LoaderAllocator *pParentLoaderAllocator = pBinder->GetLoaderAllocator(); if (pParentLoaderAllocator == NULL) { - // The AssemblyLoadContext for which we are resolving the the Assembly is not collectible. - COMPlusThrow(kNotSupportedException, W("NotSupported_CollectibleBoundNonCollectible")); + // The AssemblyLoadContext for which we are resolving the Assembly is not collectible. + COMPlusThrow(kNotSupportedException, W("NotSupported_CollectibleBoundNonCollectible")); } _ASSERTE(pResultAssemblyLoaderAllocator); diff --git a/src/coreclr/vm/appdomain.hpp b/src/coreclr/vm/appdomain.hpp index d82d6701794..5a5a1d97c6b 100644 --- a/src/coreclr/vm/appdomain.hpp +++ b/src/coreclr/vm/appdomain.hpp @@ -671,7 +671,7 @@ private: //-------------------------------------------------------------------------------------- // Base class for domains. It provides an abstract way of finding the first assembly and -// for creating assemblies in the the domain. The system domain only has one assembly, it +// for creating assemblies in the domain. The system domain only has one assembly, it // contains the classes that are logically shared between domains. All other domains can // have multiple assemblies. Iteration is done be getting the first assembly and then // calling the Next() method on the assembly. @@ -761,7 +761,7 @@ typedef PEFileListLock::Holder PEFileListLockHolder; // The PendingLoadQueue is a per thread data structure which serves two purposes. First, it // holds a "load limit" which automatically restricts the level of recursive loads to be // one less than the current load which is preceding. This, together with the AppDomain -// LoadLock level behavior, will prevent any deadlocks from occuring due to circular +// LoadLock level behavior, will prevent any deadlocks from occurring due to circular // dependencies. (Note that it is important that the loading logic understands this restriction, // and any given level of loading must deal with the fact that any recursive loads will be partially // unfulfilled in a specific way.) diff --git a/src/coreclr/vm/arm/gmscpu.h b/src/coreclr/vm/arm/gmscpu.h index 7ee46c47286..faa93a2279b 100644 --- a/src/coreclr/vm/arm/gmscpu.h +++ b/src/coreclr/vm/arm/gmscpu.h @@ -165,7 +165,7 @@ typedef DPTR(LazyMachState) PTR_LazyMachState; EXTERN_C void LazyMachStateCaptureState(struct LazyMachState *pState); // CAPTURE_STATE captures just enough register state so that the state of the -// processor can be deterined just after the the routine that has CAPTURE_STATE in +// processor can be deterined just after the routine that has CAPTURE_STATE in // it returns. #define CAPTURE_STATE(machState, ret) \ diff --git a/src/coreclr/vm/ceeload.h b/src/coreclr/vm/ceeload.h index a364179e03e..d10baac2f77 100644 --- a/src/coreclr/vm/ceeload.h +++ b/src/coreclr/vm/ceeload.h @@ -1790,7 +1790,7 @@ public: // active execution in one module to another module without // involving triggering the file loader to ensure that the // destination module is active. We must explicitly list these - // relationships so the the loader can ensure that the activation + // relationships so the loader can ensure that the activation // constraints are a priori satisfied. // // Conditional vs. Unconditional describes how we deal with diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp index 51e4ae6a543..e1c9bddedde 100644 --- a/src/coreclr/vm/ceemain.cpp +++ b/src/coreclr/vm/ceemain.cpp @@ -72,7 +72,7 @@ // * file:..\inc\corhdr.h#ManagedHeader - From a data structure point of view, this is the entry point into // the runtime. This is how all other data in the EXE are found. // -// * code:ICorJitCompiler#EEToJitInterface - This is the interface from the the EE to the Just in time (JIT) +// * code:ICorJitCompiler#EEToJitInterface - This is the interface from the EE to the Just in time (JIT) // compiler. The interface to the JIT is relatively simple (compileMethod), however the EE provides a // rich set of callbacks so the JIT can get all the information it needs. See also // file:../../Documentation/botr/ryujit-overview.md for general information on the JIT. @@ -1204,7 +1204,7 @@ void STDMETHODCALLTYPE EEShutDownHelper(BOOL fIsDllUnloading) if (!g_fProcessDetach) { // Convert key locks into "shutdown" mode. A lock in shutdown mode means: - // - Only the finalizer/helper/shutdown threads will be able to take the the lock. + // - Only the finalizer/helper/shutdown threads will be able to take the lock. // - Any other thread that tries takes it will just get redirected to an endless WaitForEndOfShutdown(). // // The only managed code that should run after this point is the finalizers for shutdown. @@ -1934,7 +1934,7 @@ static void TerminateDebugger(void) // Impl for UtilLoadStringRC Callback: In VM, we let the thread decide culture // copy culture name into szBuffer and return length // --------------------------------------------------------------------------- -extern BOOL g_fFatalErrorOccuredOnGCThread; +extern BOOL g_fFatalErrorOccurredOnGCThread; static HRESULT GetThreadUICultureNames(__inout StringArrayList* pCultureNames) { CONTRACTL @@ -1956,7 +1956,7 @@ static HRESULT GetThreadUICultureNames(__inout StringArrayList* pCultureNames) #if 0 // Enable and test if/once the unmanaged runtime is localized Thread * pThread = GetThreadNULLOk(); - // When fatal errors have occured our invariants around GC modes may be broken and attempting to transition to co-op may hang + // When fatal errors have occurred our invariants around GC modes may be broken and attempting to transition to co-op may hang // indefinately. We want to ensure a clean exit so rather than take the risk of hang we take a risk of the error resource not // getting localized with a non-default thread-specific culture. // A canonical stack trace that gets here is a fatal error in the GC that comes through: @@ -1972,7 +1972,7 @@ static HRESULT GetThreadUICultureNames(__inout StringArrayList* pCultureNames) // coreclr.dll!EventReporter::EventReporter // coreclr.dll!EEPolicy::LogFatalError // coreclr.dll!EEPolicy::HandleFatalError - if (pThread != NULL && !g_fFatalErrorOccuredOnGCThread) { + if (pThread != NULL && !g_fFatalErrorOccurredOnGCThread) { // Switch to cooperative mode, since we'll be looking at managed objects // and we don't want them moving on us. @@ -2086,7 +2086,7 @@ static int GetThreadUICultureId(_Out_ LocaleIDValue* pLocale) Thread * pThread = GetThreadNULLOk(); #if 0 // Enable and test if/once the unmanaged runtime is localized - // When fatal errors have occured our invariants around GC modes may be broken and attempting to transition to co-op may hang + // When fatal errors have occurred our invariants around GC modes may be broken and attempting to transition to co-op may hang // indefinately. We want to ensure a clean exit so rather than take the risk of hang we take a risk of the error resource not // getting localized with a non-default thread-specific culture. // A canonical stack trace that gets here is a fatal error in the GC that comes through: @@ -2102,7 +2102,7 @@ static int GetThreadUICultureId(_Out_ LocaleIDValue* pLocale) // coreclr.dll!EventReporter::EventReporter // coreclr.dll!EEPolicy::LogFatalError // coreclr.dll!EEPolicy::HandleFatalError - if (pThread != NULL && !g_fFatalErrorOccuredOnGCThread) + if (pThread != NULL && !g_fFatalErrorOccurredOnGCThread) { // Switch to cooperative mode, since we'll be looking at managed objects diff --git a/src/coreclr/vm/classhash.cpp b/src/coreclr/vm/classhash.cpp index 7320f7bae72..00e61836e7a 100644 --- a/src/coreclr/vm/classhash.cpp +++ b/src/coreclr/vm/classhash.cpp @@ -363,7 +363,7 @@ public: #endif // _DEBUG // This entrypoint lets the caller separate the allocation of the entrypoint from the actual insertion into the hashtable. (This lets us -// do multiple insertions without having to worry about an OOM occuring inbetween.) +// do multiple insertions without having to worry about an OOM occurring inbetween.) // // The newEntry must have been allocated using AllocEntry. It must not be referenced by any other entity (other than a holder or tracker) // If this function throws, the caller is responsible for freeing the entry. diff --git a/src/coreclr/vm/classlayoutinfo.cpp b/src/coreclr/vm/classlayoutinfo.cpp index ca9f3e85132..2461214cfaf 100644 --- a/src/coreclr/vm/classlayoutinfo.cpp +++ b/src/coreclr/vm/classlayoutinfo.cpp @@ -620,7 +620,7 @@ VOID EEClassLayoutInfo::CollectLayoutFieldMetadataThrowing( CONSISTENCY_CHECK_MSGF(false, ("BreakOnStructMarshalSetup: '%s' ", szName)); #endif - // Running tote - if anything in this type disqualifies it from being ManagedSequential, somebody will set this to TRUE by the the time + // Running tote - if anything in this type disqualifies it from being ManagedSequential, somebody will set this to TRUE by the time // function exits. BOOL fDisqualifyFromManagedSequential; BOOL hasAutoLayoutField = FALSE; diff --git a/src/coreclr/vm/codeman.cpp b/src/coreclr/vm/codeman.cpp index 155de4fcfd4..6ae85b4d60c 100644 --- a/src/coreclr/vm/codeman.cpp +++ b/src/coreclr/vm/codeman.cpp @@ -272,7 +272,7 @@ void UnwindInfoTable::AddToUnwindInfoTable(UnwindInfoTable** unwindInfoPtr, PT_R if (unwindInfo->hHandle == NULL) return; - // Check for the fast path: we are adding the the end of an UnwindInfoTable with space + // Check for the fast path: we are adding the end of an UnwindInfoTable with space if (unwindInfo->cTableCurCount < unwindInfo->cTableMaxCount) { if (unwindInfo->cTableCurCount == 0 || @@ -3761,7 +3761,7 @@ void EEJitManager::AddToCleanupList(HostCodeHeap *pCodeHeap) // it may happen that the current heap count goes to 0 and later on, before it is destroyed, it gets reused // for another dynamic method. // It's then possible that the ref count reaches 0 multiple times. If so we simply don't add it again - // Also on cleanup we check the the ref count is actually 0. + // Also on cleanup we check the ref count is actually 0. HostCodeHeap *pHeap = m_cleanupList; while (pHeap) { @@ -5018,7 +5018,7 @@ void ExecutionManager::DeleteRange(TADDR pStartRange) if (pCurr != NULL) { - // If pPrev is NULL the the head of this list is to be deleted + // If pPrev is NULL the head of this list is to be deleted if (pPrev == NULL) { m_CodeRangeList = pCurr->pnext; diff --git a/src/coreclr/vm/comcache.cpp b/src/coreclr/vm/comcache.cpp index bdfb34497cd..57eb3ced786 100644 --- a/src/coreclr/vm/comcache.cpp +++ b/src/coreclr/vm/comcache.cpp @@ -721,7 +721,7 @@ IUnknown* IUnkEntry::UnmarshalIUnknownForCurrContext() // The proxy is no longer valid. This sometimes manifests itself by // a failure during re-marshaling it to the stream. When this happens, - // we need to release the the pUnk we extracted and the stream and try to + // we need to release the pUnk we extracted and the stream and try to // re-create the stream. We don't want to release the stream data since // we already extracted the proxy from the stream and released it. RCW_VTABLEPTR(GetRCW()); diff --git a/src/coreclr/vm/comcache.h b/src/coreclr/vm/comcache.h index 6b395d6f31f..9010eafa50e 100644 --- a/src/coreclr/vm/comcache.h +++ b/src/coreclr/vm/comcache.h @@ -195,7 +195,7 @@ private : // Helper function called from MarshalIUnknownToStreamCallback. HRESULT MarshalIUnknownToStream(); - // Method to try and start updating the the entry. + // Method to try and start updating the entry. bool TryUpdateEntry(); // Method to end updating the entry. diff --git a/src/coreclr/vm/comdynamic.cpp b/src/coreclr/vm/comdynamic.cpp index 99a6c788b1e..4cdecbb43a7 100644 --- a/src/coreclr/vm/comdynamic.cpp +++ b/src/coreclr/vm/comdynamic.cpp @@ -415,7 +415,7 @@ extern "C" void QCALLTYPE TypeBuilder_SetMethodIL(QCall::ModuleHandle pModule, CQuickArray ehTypeOffsets; if (numExceptions > 0) { - // Allocate space for the the offsets to the TypeTokens in the Exception headers + // Allocate space for the offsets to the TypeTokens in the Exception headers // in the IL stream. ehTypeOffsets.AllocThrows(numExceptions); diff --git a/src/coreclr/vm/commodule.h b/src/coreclr/vm/commodule.h index 3997a62d467..e5f2a5a94aa 100644 --- a/src/coreclr/vm/commodule.h +++ b/src/coreclr/vm/commodule.h @@ -44,7 +44,7 @@ extern "C" INT32 QCALLTYPE ModuleBuilder_GetArrayMethodToken(QCall::ModuleHandle // This function will return the MemberRef token extern "C" INT32 QCALLTYPE ModuleBuilder_GetMemberRef(QCall::ModuleHandle pModule, QCall::ModuleHandle pRefedModule, INT32 tr, INT32 token); -// This function return a MemberRef token given a MethodInfo describing a array method +// This function return a MemberRef token given a MethodInfo describing an array method extern "C" INT32 QCALLTYPE ModuleBuilder_GetMemberRefOfMethodInfo(QCall::ModuleHandle pModule, INT32 tr, MethodDesc * method); diff --git a/src/coreclr/vm/comtoclrcall.cpp b/src/coreclr/vm/comtoclrcall.cpp index 6994afdd85c..d9c76f3ecb8 100644 --- a/src/coreclr/vm/comtoclrcall.cpp +++ b/src/coreclr/vm/comtoclrcall.cpp @@ -122,7 +122,7 @@ extern "C" HRESULT STDCALL StubRareDisableHRWorker(Thread *pThread) // when we start executing here, we are actually in cooperative mode. But we // haven't synchronized with the barrier to reentry yet. So we are in a highly // dangerous mode. If we call managed code, we will potentially be active in - // the GC heap, even as GC's are occuring! + // the GC heap, even as GC's are occurring! // We must do the following in this order, because otherwise we would be constructing // the exception for the abort without synchronizing with the GC. Also, we have no diff --git a/src/coreclr/vm/comutilnative.cpp b/src/coreclr/vm/comutilnative.cpp index 1814c3cffb5..732c6042ce8 100644 --- a/src/coreclr/vm/comutilnative.cpp +++ b/src/coreclr/vm/comutilnative.cpp @@ -1895,7 +1895,7 @@ static INT32 RegularGetValueTypeHashCode(MethodTable *mt, void *pObjRef) canUseFastGetHashCodeHelper = CanCompareBitsOrUseFastGetHashCode(mt); } - // While we shouln't get here directly from ValueTypeHelper::GetHashCode, if we recurse we need to + // While we should not get here directly from ValueTypeHelper::GetHashCode, if we recurse we need to // be able to handle getting the hashcode for an embedded structure whose hashcode is computed by the fast path. if (canUseFastGetHashCodeHelper) { diff --git a/src/coreclr/vm/debugdebugger.cpp b/src/coreclr/vm/debugdebugger.cpp index 2de0d482483..ff2213983bb 100644 --- a/src/coreclr/vm/debugdebugger.cpp +++ b/src/coreclr/vm/debugdebugger.cpp @@ -803,7 +803,7 @@ typedef Wrapper, HolderDestroyStrongHandle // receives a custom notification object from the target and sends it to the RS via // code:Debugger::SendCustomDebuggerNotification -// Argument: dataUNSAFE - a pointer the the custom notification object being sent +// Argument: dataUNSAFE - a pointer the custom notification object being sent FCIMPL1(void, DebugDebugger::CustomNotification, Object * dataUNSAFE) { CONTRACTL diff --git a/src/coreclr/vm/dwreport.h b/src/coreclr/vm/dwreport.h index 821213ec9df..95b19c14989 100644 --- a/src/coreclr/vm/dwreport.h +++ b/src/coreclr/vm/dwreport.h @@ -3,7 +3,7 @@ // // FILE: dwreport.h // -// This file contains declarations for functions used to report errors occuring +// This file contains declarations for functions used to report errors occurring // in a process running managed code. // diff --git a/src/coreclr/vm/eepolicy.cpp b/src/coreclr/vm/eepolicy.cpp index 13c74788259..a1c909128ad 100644 --- a/src/coreclr/vm/eepolicy.cpp +++ b/src/coreclr/vm/eepolicy.cpp @@ -396,7 +396,7 @@ void LogInfoForFatalError(UINT exitCode, LPCWSTR pszMessage, LPCWSTR errorSource } //This starts FALSE and then converts to true if HandleFatalError has ever been called by a GC thread -BOOL g_fFatalErrorOccuredOnGCThread = FALSE; +BOOL g_fFatalErrorOccurredOnGCThread = FALSE; // // Log an error to the event log if possible, then throw up a dialog box. // @@ -520,7 +520,7 @@ void EEPolicy::LogFatalError(UINT exitCode, UINT_PTR address, LPCWSTR pszMessage //Give a managed debugger a chance if this fatal error is on a managed thread. Thread *pThread = GetThreadNULLOk(); - if (pThread && !g_fFatalErrorOccuredOnGCThread) + if (pThread && !g_fFatalErrorOccurredOnGCThread) { GCX_COOP(); @@ -765,11 +765,11 @@ int NOINLINE EEPolicy::HandleFatalError(UINT exitCode, UINT_PTR address, LPCWSTR CONTRACT_VIOLATION(GCViolation | ModeViolation | FaultNotFatal | TakesLockViolation); - // Setting g_fFatalErrorOccuredOnGCThread allows code to avoid attempting to make GC mode transitions which could - // block indefinately if the fatal error occured during the GC. + // Setting g_fFatalErrorOccurredOnGCThread allows code to avoid attempting to make GC mode transitions which could + // block indefinately if the fatal error occurred during the GC. if (IsGCSpecialThread() && GCHeapUtilities::IsGCInProgress()) { - g_fFatalErrorOccuredOnGCThread = TRUE; + g_fFatalErrorOccurredOnGCThread = TRUE; } // ThreadStore lock needs to be released before continuing with the FatalError handling should diff --git a/src/coreclr/vm/eetwain.cpp b/src/coreclr/vm/eetwain.cpp index 03c20df6301..47e07ff1e8e 100644 --- a/src/coreclr/vm/eetwain.cpp +++ b/src/coreclr/vm/eetwain.cpp @@ -6074,7 +6074,7 @@ void EECodeManager::EnumMemoryRegions(CLRDataEnumMemoryFlags flags) * GetAmbientSP * * This function computes the zero-depth stack pointer for the given nesting - * level within the method given. Nesting level is the the depth within + * level within the method given. Nesting level is the depth within * try-catch-finally blocks, and is zero based. It is up to the caller to * supply a valid nesting level value. * diff --git a/src/coreclr/vm/excep.cpp b/src/coreclr/vm/excep.cpp index 04c912995fc..4bd27316c13 100644 --- a/src/coreclr/vm/excep.cpp +++ b/src/coreclr/vm/excep.cpp @@ -6580,7 +6580,7 @@ IsDebuggerFault(EXCEPTION_RECORD *pExceptionRecord, // Is this exception really meant for the COM+ Debugger? Note: we will let the debugger have a chance if there // is a debugger attached to any part of the process. It is incorrect to consider whether or not the debugger - // is attached the the thread's current app domain at this point. + // is attached the thread's current app domain at this point. // Even if a debugger is not attached, we must let the debugger handle the exception in case it's coming from a // patch-skipper. @@ -7063,7 +7063,7 @@ bool ShouldHandleManagedFault( // // Is this exception really meant for the COM+ Debugger? Note: we will let the debugger have a chance if there is a // debugger attached to any part of the process. It is incorrect to consider whether or not the debugger is attached - // the the thread's current app domain at this point. + // the thread's current app domain at this point. // A managed exception never comes from managed code, and we can ignore all breakpoint @@ -9641,7 +9641,7 @@ BOOL SetupWatsonBucketsForFailFast(EXCEPTIONREF refException) // Keep the UETracker clean pUEWatsonBucketTracker->ClearWatsonBucketDetails(); - // Since we couldnt find the watson bucket tracker for the the inner most exception, + // Since we couldnt find the watson bucket tracker for the inner most exception, // try to look for the buckets in the throwable. fCheckThrowableForWatsonBuckets = TRUE; } diff --git a/src/coreclr/vm/exceptionhandling.cpp b/src/coreclr/vm/exceptionhandling.cpp index ec40eda20c5..546a7e69b42 100644 --- a/src/coreclr/vm/exceptionhandling.cpp +++ b/src/coreclr/vm/exceptionhandling.cpp @@ -742,7 +742,7 @@ UINT_PTR ExceptionTracker::FinishSecondPass( // // In a case when we're nested inside another catch block, the domain in which we're executing may not be the // same as the one the domain of the throwable that was just made the current throwable above. Therefore, we - // make a special effort to preserve the domain of the throwable as we update the the last thrown object. + // make a special effort to preserve the domain of the throwable as we update the last thrown object. // // If an exception is active, we dont want to reset the LastThrownObject to NULL as the active exception // might be represented by a tracker created in the second pass (refer to diff --git a/src/coreclr/vm/frames.h b/src/coreclr/vm/frames.h index 1dfa92b82b9..8b2a3d93eb4 100644 --- a/src/coreclr/vm/frames.h +++ b/src/coreclr/vm/frames.h @@ -2126,7 +2126,7 @@ public: return TYPE_INTERCEPTION; } - // Our base class is a a M2U TransitionType; but we're not. So override and set us back to None. + // Our base class is an M2U TransitionType; but we're not. So override and set us back to None. ETransitionType GetTransitionType() { LIMITED_METHOD_DAC_CONTRACT; @@ -2387,7 +2387,7 @@ public: return INTERCEPTION_PRESTUB; } - // Our base class is a a M2U TransitionType; but we're not. So override and set us back to None. + // Our base class is an M2U TransitionType; but we're not. So override and set us back to None. virtual ETransitionType GetTransitionType() { LIMITED_METHOD_DAC_CONTRACT; diff --git a/src/coreclr/vm/gcheaputilities.cpp b/src/coreclr/vm/gcheaputilities.cpp index 791c4d6e368..088af916fc5 100644 --- a/src/coreclr/vm/gcheaputilities.cpp +++ b/src/coreclr/vm/gcheaputilities.cpp @@ -49,7 +49,7 @@ enum GC_LOAD_STATUS { }; // Load status of the GC. If GC loading fails, the value of this -// global indicates where the failure occured. +// global indicates where the failure occurred. GC_LOAD_STATUS g_gc_load_status = GC_LOAD_STATUS_BEFORE_START; // The version of the GC that we have loaded. @@ -60,7 +60,7 @@ PTR_VOID g_gc_module_base; bool GCHeapUtilities::s_useThreadAllocationContexts; -// GC entrypoints for the the linked-in GC. These symbols are invoked +// GC entrypoints for the linked-in GC. These symbols are invoked // directly if we are not using a standalone GC. extern "C" void GC_VersionInfo(/* Out */ VersionInfo* info); extern "C" HRESULT GC_Initialize( diff --git a/src/coreclr/vm/hillclimbing.cpp b/src/coreclr/vm/hillclimbing.cpp index d8b1da18659..315ceb2bba8 100644 --- a/src/coreclr/vm/hillclimbing.cpp +++ b/src/coreclr/vm/hillclimbing.cpp @@ -195,7 +195,7 @@ int HillClimbing::Update(int currentThreadCount, double sampleDuration, int numC double adjacentPeriod2 = sampleCount / (((double)sampleCount / (double)m_wavePeriod) - 1); // - // Get the the three different frequency components of the throughput (scaled by average + // Get the three different frequency components of the throughput (scaled by average // throughput). Our "error" estimate (the amount of noise that might be present in the // frequency band we're really interested in) is the average of the adjacent bands. // diff --git a/src/coreclr/vm/i386/RedirectedHandledJITCase.asm b/src/coreclr/vm/i386/RedirectedHandledJITCase.asm index 8b8319dfb8d..032315c7151 100644 --- a/src/coreclr/vm/i386/RedirectedHandledJITCase.asm +++ b/src/coreclr/vm/i386/RedirectedHandledJITCase.asm @@ -26,7 +26,7 @@ EXTERN _GetCurrentSavedRedirectContext@0:PROC ; WARNING!! restoring the context prior to any stackwalk. This means that ; WARNING!! we need to ensure that no GC can occur while the stack is ; WARNING!! unwalkable. This further means that we cannot allow any exception -; WARNING!! to occure when the stack is unwalkable +; WARNING!! to occur when the stack is unwalkable ; diff --git a/src/coreclr/vm/i386/cgenx86.cpp b/src/coreclr/vm/i386/cgenx86.cpp index 8ced6a6c58a..7b6fa220046 100644 --- a/src/coreclr/vm/i386/cgenx86.cpp +++ b/src/coreclr/vm/i386/cgenx86.cpp @@ -1007,7 +1007,7 @@ extern "C" VOID STDCALL StubRareDisableTHROWWorker(Thread *pThread) // when we start executing here, we are actually in cooperative mode. But we // haven't synchronized with the barrier to reentry yet. So we are in a highly // dangerous mode. If we call managed code, we will potentially be active in - // the GC heap, even as GC's are occuring! + // the GC heap, even as GC's are occurring! // We must do the following in this order, because otherwise we would be constructing // the exception for the abort without synchronizing with the GC. Also, we have no diff --git a/src/coreclr/vm/i386/excepx86.cpp b/src/coreclr/vm/i386/excepx86.cpp index 15dd0667dd6..524b0ebd9ee 100644 --- a/src/coreclr/vm/i386/excepx86.cpp +++ b/src/coreclr/vm/i386/excepx86.cpp @@ -1798,7 +1798,7 @@ NOINLINE LPVOID COMPlusEndCatchWorker(Thread * pThread) // // In a case when we're nested inside another catch block, the domain in which we're executing may not be the // same as the one the domain of the throwable that was just made the current throwable above. Therefore, we - // make a special effort to preserve the domain of the throwable as we update the the last thrown object. + // make a special effort to preserve the domain of the throwable as we update the last thrown object. // // This function (COMPlusEndCatch) can also be called by the in-proc debugger helper thread on x86 when // an attempt to SetIP takes place to set IP outside the catch clause. In such a case, managed thread object diff --git a/src/coreclr/vm/i386/gmscpu.h b/src/coreclr/vm/i386/gmscpu.h index 4f8535c9389..6d49fa3aeb0 100644 --- a/src/coreclr/vm/i386/gmscpu.h +++ b/src/coreclr/vm/i386/gmscpu.h @@ -112,7 +112,7 @@ private: inline void LazyMachState::setLazyStateFromUnwind(MachState* copy) { // _pRetAddr has to be the last thing updated when we make the copy (because its - // is the the _pRetAddr becoming non-zero that flips this from invalid to valid. + // is the _pRetAddr becoming non-zero that flips this from invalid to valid. // we assert that it is the last field in the struct. static_assert_no_msg(offsetof(MachState, _pRetAddr) + sizeof(_pRetAddr) == sizeof(MachState)); @@ -129,10 +129,10 @@ inline void LazyMachState::setLazyStateFromUnwind(MachState* copy) EXTERN_C int __fastcall LazyMachStateCaptureState(struct LazyMachState *pState); // CAPTURE_STATE captures just enough register state so that the state of the -// processor can be deterined just after the the routine that has CAPTURE_STATE in +// processor can be deterined just after the routine that has CAPTURE_STATE in // it returns. -// Note that the return is never taken, is is there for epilog walking +// Note that the return is never taken, it is there for epilog walking #define CAPTURE_STATE(machState, ret) \ if (LazyMachStateCaptureState(machState)) ret diff --git a/src/coreclr/vm/i386/gmsx86.cpp b/src/coreclr/vm/i386/gmsx86.cpp index dcdd1e36c6e..9d982ad689a 100644 --- a/src/coreclr/vm/i386/gmsx86.cpp +++ b/src/coreclr/vm/i386/gmsx86.cpp @@ -1273,7 +1273,7 @@ done: _ASSERTE(epilogCallRet == 0); // At this point the fields in 'frame' coorespond exactly to the register - // state when the the helper returns to its caller. + // state when the helper returns to its caller. lazyState->_esp = dac_cast(ESP); } #ifdef _PREFAST_ diff --git a/src/coreclr/vm/interoplibinterface_objc.cpp b/src/coreclr/vm/interoplibinterface_objc.cpp index 1a28c1689d9..4b67dc7084a 100644 --- a/src/coreclr/vm/interoplibinterface_objc.cpp +++ b/src/coreclr/vm/interoplibinterface_objc.cpp @@ -38,7 +38,7 @@ extern "C" BOOL QCALLTYPE ObjCMarshal_TryInitializeReferenceTracker( BEGIN_QCALL; // Switch to Cooperative mode since we are setting callbacks that - // will be used during a GC and we want to ensure a GC isn't occuring + // will be used during a GC and we want to ensure a GC isn't occurring // while they are being set. { GCX_COOP(); diff --git a/src/coreclr/vm/jithelpers.cpp b/src/coreclr/vm/jithelpers.cpp index 67f4f9c9c7f..c734453b30a 100644 --- a/src/coreclr/vm/jithelpers.cpp +++ b/src/coreclr/vm/jithelpers.cpp @@ -5455,7 +5455,7 @@ HCIMPLEND /**********************************************************************/ /* Fills out portions of an InlinedCallFrame for JIT64 */ -/* The idea here is to allocate and initalize the frame to only once, */ +/* The idea here is to allocate and initialize the frame to only once, */ /* regardless of how many PInvokes there are in the method */ Thread * __stdcall JIT_InitPInvokeFrame(InlinedCallFrame *pFrame, PTR_VOID StubSecretArg) { diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp index e73be506760..cb5e8092fbe 100644 --- a/src/coreclr/vm/jitinterface.cpp +++ b/src/coreclr/vm/jitinterface.cpp @@ -303,7 +303,7 @@ CorInfoType CEEInfo::asCorInfoType(CorElementType eeType, // Zap the typeHnd when the type _really_ is a primitive // as far as verification is concerned. Returning a null class - // handle means it is is a primitive. + // handle means it is a primitive. // // Enums are exactly like primitives, even from a verification standpoint, // so we zap the type handle in this case. @@ -5715,7 +5715,7 @@ CorInfoHelpFunc CEEInfo::getNewHelperStatic(MethodTable * pMT, bool * pHasSideEf } #ifdef FEATURE_DOUBLE_ALIGNMENT_HINT - // If we are use the the fast allocator we also may need the + // If we are use the fast allocator we also may need the // specialized varion for align8 if (pMT->GetClass()->IsAlign8Candidate() && (helper == CORINFO_HELP_NEWSFAST)) @@ -7325,7 +7325,7 @@ bool getILIntrinsicImplementationForRuntimeHelpers(MethodDesc * ftn, } else if (tk == CoreLibBinder::GetMethod(METHOD__RUNTIME_HELPERS__ENUM_COMPARE_TO)->GetMemberDef()) { - // The the comment above on why this is is not an unconditional replacement. This case handles + // The comment above on why this is not an unconditional replacement. This case handles // Enums backed by 8 byte values. _ASSERTE(ftn->HasMethodInstantiation()); @@ -8648,7 +8648,7 @@ bool CEEInfo::resolveVirtualMethodHelper(CORINFO_DEVIRTUALIZATION_INFO * info) { // Virtual call devirtualization. // - // The derived class should be a subclass of the the base class. + // The derived class should be a subclass of the base class. MethodTable* pCheckMT = pObjMT; while (pCheckMT != nullptr) @@ -9126,7 +9126,7 @@ CORINFO_CLASS_HANDLE CEEInfo::getFieldClass (CORINFO_FIELD_HANDLE fieldHnd) } /*********************************************************************/ -// Returns the basic type of the field (not the the type that declares the field) +// Returns the basic type of the field (not the type that declares the field) // // pTypeHnd - Optional. If not null then on return, for reference and value types, // *pTypeHnd will contain the normalized type of the field. @@ -11251,7 +11251,7 @@ void CEEJitInfo::allocUnwindInfo ( #ifdef _DEBUG if (funcKind != CORJIT_FUNC_ROOT) { - // Check the the new funclet doesn't overlap any existing funclet. + // Check the new funclet doesn't overlap any existing funclet. for (ULONG iUnwindInfo = 0; iUnwindInfo < m_usedUnwindInfos - 1; iUnwindInfo++) { diff --git a/src/coreclr/vm/method.hpp b/src/coreclr/vm/method.hpp index f7ad9480282..50981f72806 100644 --- a/src/coreclr/vm/method.hpp +++ b/src/coreclr/vm/method.hpp @@ -1545,7 +1545,7 @@ public: // code pass in an BoxedEntryPointStub when pPrimaryMD is a virtual/interface method on // a struct. These cases are confusing and should be rooted // out: it is probably preferable in terms - // of correctness to pass in the the corresponding non-unboxing MD. + // of correctness to pass in the corresponding non-unboxing MD. // // allowCreate may be set to FALSE to enforce that the method searched // should already be in existence - thus preventing creation and GCs during diff --git a/src/coreclr/vm/methodtable.cpp b/src/coreclr/vm/methodtable.cpp index 88b02f1098e..c1016ff9bed 100644 --- a/src/coreclr/vm/methodtable.cpp +++ b/src/coreclr/vm/methodtable.cpp @@ -1525,7 +1525,7 @@ BOOL MethodTable::CanCastByVarianceToInterfaceOrDelegate(MethodTable *pTargetMT, TypeHandle thTargetArg = targetInst[i]; // If argument types are not equivalent, test them for compatibility - // in accordance with the the variance annotation + // in accordance with the variance annotation if (!thArg.IsEquivalentTo(thTargetArg)) { switch (pClass->GetVarianceOfTypeParameter(i)) diff --git a/src/coreclr/vm/methodtablebuilder.cpp b/src/coreclr/vm/methodtablebuilder.cpp index fba71a74903..21f7b0df5df 100644 --- a/src/coreclr/vm/methodtablebuilder.cpp +++ b/src/coreclr/vm/methodtablebuilder.cpp @@ -4677,7 +4677,7 @@ BOOL MethodTableBuilder::TestOverrideForAccessibility( // Cross-Assembly else { - // If the method marks itself as check visibility the the method must be + // If the method marks itself as check visibility the method must be // public, FamORAssem, or family if((dwParentAttrs & mdMemberAccessMask) <= mdAssem) { diff --git a/src/coreclr/vm/object.h b/src/coreclr/vm/object.h index dd3a308e7bf..7d5e4b121f1 100644 --- a/src/coreclr/vm/object.h +++ b/src/coreclr/vm/object.h @@ -545,7 +545,7 @@ private: // INT32 lowerBounds[rank]; Valid indexes are lowerBounds[i] <= index[i] < lowerBounds[i] + bounds[i] public: - // Get the element type for the array, this works whether the the element + // Get the element type for the array, this works whether the element // type is stored in the array or not inline TypeHandle GetArrayElementTypeHandle() const; diff --git a/src/coreclr/vm/object.inl b/src/coreclr/vm/object.inl index 46b8db4d0d8..8d900ed6338 100644 --- a/src/coreclr/vm/object.inl +++ b/src/coreclr/vm/object.inl @@ -191,7 +191,7 @@ inline /* static */ unsigned ArrayBase::GetLowerBoundsOffset(MethodTable* pMT) sizeof(INT32); } -// Get the element type for the array, this works whether the the element +// Get the element type for the array, this works whether the element // type is stored in the array or not inline TypeHandle ArrayBase::GetArrayElementTypeHandle() const { diff --git a/src/coreclr/vm/olevariant.cpp b/src/coreclr/vm/olevariant.cpp index f61511e5003..6f90f9a3ff8 100644 --- a/src/coreclr/vm/olevariant.cpp +++ b/src/coreclr/vm/olevariant.cpp @@ -4796,7 +4796,7 @@ void OleVariant::TransposeArrayData(BYTE *pDestData, BYTE *pSrcData, SIZE_T dwNu aDestElemCount[iDims] = pSafeArray->rgsabound[iDims].cElements; } - // Initalize the indexes for each dimension to 0. + // Initialize the indexes for each dimension to 0. memset(aDestIndex, 0, pSafeArray->cDims * sizeof(int)); // Set all the destination data positions to the start of the array. diff --git a/src/coreclr/vm/profilinghelper.cpp b/src/coreclr/vm/profilinghelper.cpp index 70227d7a34a..ff9223d16eb 100644 --- a/src/coreclr/vm/profilinghelper.cpp +++ b/src/coreclr/vm/profilinghelper.cpp @@ -986,7 +986,7 @@ HRESULT ProfilingAPIUtility::DoPreInitialization( #endif // FEATURE_PROFAPI_ATTACH_DETACH // Initialize internal state of our EEToProfInterfaceImpl. This also loads the - // profiler itself, but does not yet call its Initalize() callback + // profiler itself, but does not yet call its Initialize() callback hr = pEEProf->Init(pProfEE, pClsid, wszClsid, wszProfilerDLL, (loadType == kAttachLoad), dwConcurrentGCWaitTimeoutInMs); if (FAILED(hr)) { diff --git a/src/coreclr/vm/runtimecallablewrapper.cpp b/src/coreclr/vm/runtimecallablewrapper.cpp index fca8708ec1e..5e130282822 100644 --- a/src/coreclr/vm/runtimecallablewrapper.cpp +++ b/src/coreclr/vm/runtimecallablewrapper.cpp @@ -1474,7 +1474,7 @@ void RCW::Initialize(IUnknown* pUnk, DWORD dwSyncBlockIndex, MethodTable *pClass // We can't safely pump here for Releasing (or directly release) // if we're currently in a SendMessage. - // Also, clients can opt out of this. The option is is a per-thread flag which they can + // Also, clients can opt out of this. The option is a per-thread flag which they can // set by calling DisableComEagerCleanup on the appropriate thread. Why would they // want to opt out? Because pumping can lead to re-entrancy in in unexpected places. // If a client decides to opt out, they are required to cleanup RCWs themselves by diff --git a/src/coreclr/vm/siginfo.cpp b/src/coreclr/vm/siginfo.cpp index c52c462c1ff..e5b108ac7ca 100644 --- a/src/coreclr/vm/siginfo.cpp +++ b/src/coreclr/vm/siginfo.cpp @@ -3514,7 +3514,7 @@ BOOL CompareTypeTokens(mdToken tk1, mdToken tk2, Module *pModule1, Module *pModu } ////////////////////////////////////////////////////////////////////// - // OK, we have non-nested types or the the enclosing types are equivalent + // OK, we have non-nested types or the enclosing types are equivalent // Do not load the type! (Or else you may run into circular dependency loading problems.) diff --git a/src/coreclr/vm/syncblk.h b/src/coreclr/vm/syncblk.h index a57809c5f8c..e137532a090 100644 --- a/src/coreclr/vm/syncblk.h +++ b/src/coreclr/vm/syncblk.h @@ -1287,8 +1287,8 @@ class SyncBlockCache DWORD m_FreeSyncBlock; // Next Free Syncblock in the array // The next variables deal with SyncTableEntries. Instead of having the object-header - // point directly at SyncBlocks, the object points a a syncTableEntry, which points at - // the syncBlock. This is done because in a common case (need a hash code for an object) + // point directly at SyncBlocks, the object points at a syncTableEntry, which in turn points + // at the syncBlock. This is done because in a common case (need a hash code for an object) // you just need a syncTableEntry. DWORD m_FreeSyncTableIndex; // We allocate a large array of SyncTableEntry structures. diff --git a/src/coreclr/vm/threads.cpp b/src/coreclr/vm/threads.cpp index 1623c2de15f..1d9c2b15b46 100644 --- a/src/coreclr/vm/threads.cpp +++ b/src/coreclr/vm/threads.cpp @@ -3328,7 +3328,7 @@ DWORD MsgWaitHelper(int numWaiters, HANDLE* phEvent, BOOL bWaitAll, DWORD millis if (numWaiters == 1) bWaitAll = FALSE; - // The check that's supposed to prevent this condition from occuring, in WaitHandleNative::CorWaitMultipleNative, + // The check that's supposed to prevent this condition from occurring, in WaitHandleNative::CorWaitMultipleNative, // is unfortunately behind FEATURE_COMINTEROP instead of FEATURE_COMINTEROP_APARTMENT_SUPPORT. // So on CoreCLR (where FEATURE_COMINTEROP is not currently defined) we can actually reach this point. // We can't fix this, because it's a breaking change, so we just won't assert here. diff --git a/src/coreclr/vm/threads.h b/src/coreclr/vm/threads.h index 26fbd48550c..e9eb6d139fc 100644 --- a/src/coreclr/vm/threads.h +++ b/src/coreclr/vm/threads.h @@ -60,7 +60,7 @@ // code:Frame which marks the location on the stack where the last managed method frame is. This // allows the GC to start crawling the stack from there (essentially skip over the unmanaged frames). // * That the thread will not reenter managed code if the global variable code:g_TrapReturningThreads is -// set (it will call code:Thread.RareDisablePreemptiveGC first which will block if a a suspension is +// set (it will call code:Thread.RareDisablePreemptiveGC first which will block if a suspension is // in progress) // // The basic idea is that the suspension logic in code:Thread.SuspendRuntime first sets the global variable diff --git a/src/coreclr/vm/threadsuspend.cpp b/src/coreclr/vm/threadsuspend.cpp index f2fa3a08c78..8f74be88661 100644 --- a/src/coreclr/vm/threadsuspend.cpp +++ b/src/coreclr/vm/threadsuspend.cpp @@ -2495,7 +2495,7 @@ void RedirectedThreadFrame::ExceptionUnwind() #ifdef TARGET_X86 //**************************************************************************************** -// This will check who caused the exception. If it was caused by the the redirect function, +// This will check who caused the exception. If it was caused by the redirect function, // the reason is to resume the thread back at the point it was redirected in the first // place. If the exception was not caused by the function, then it was caused by the call // out to the I[GC|Debugger]ThreadControl client and we need to determine if it's an diff --git a/src/coreclr/vm/virtualcallstub.cpp b/src/coreclr/vm/virtualcallstub.cpp index f91fc0c26d4..b51f8bee7e2 100644 --- a/src/coreclr/vm/virtualcallstub.cpp +++ b/src/coreclr/vm/virtualcallstub.cpp @@ -1765,7 +1765,7 @@ PCODE VirtualCallStubManager::ResolveWorker(StubCallSite* pCallSite, #ifdef CHAIN_LOOKUP pResolverFcn = (PCODE) GetEEFuncEntryPoint(ResolveWorkerChainLookupAsmStub); #else // CHAIN_LOOKUP - // Use the the slow resolver + // Use the slow resolver pResolverFcn = (PCODE) GetEEFuncEntryPoint(ResolveWorkerAsmStub); #endif @@ -3378,7 +3378,7 @@ BOOL BucketTable::SetUpProber(size_t keyA, size_t keyB, Prober *prober) // scenario each processor could see old memory values that would cause us to // leak memory. // - // Since this a a fairly hot code path and it is very rare for buckets[index] + // Since this is a fairly hot code path and it is very rare for buckets[index] // to be CALL_STUB_EMPTY_ENTRY, we can first try a non-volatile read and then // if it looks like we need to create a new FastTable we double check by doing // a volatile read. diff --git a/src/installer/managed/Microsoft.NET.HostModel/Bundle/Bundler.cs b/src/installer/managed/Microsoft.NET.HostModel/Bundle/Bundler.cs index b822887e658..d46f4b86c02 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/Bundle/Bundler.cs +++ b/src/installer/managed/Microsoft.NET.HostModel/Bundle/Bundler.cs @@ -235,7 +235,7 @@ namespace Microsoft.NET.HostModel.Bundle /// This doesn't include unbundled files that should be dropped, and not publised as output. /// /// - /// The full path the the generated bundle file + /// The full path the generated bundle file /// /// /// ArgumentException if input is invalid diff --git a/src/installer/tests/HostActivation.Tests/DependencyResolution/ResolveComponentDependencies.cs b/src/installer/tests/HostActivation.Tests/DependencyResolution/ResolveComponentDependencies.cs index ccf81e7cf87..33f248b546e 100644 --- a/src/installer/tests/HostActivation.Tests/DependencyResolution/ResolveComponentDependencies.cs +++ b/src/installer/tests/HostActivation.Tests/DependencyResolution/ResolveComponentDependencies.cs @@ -8,7 +8,7 @@ using Xunit; namespace Microsoft.DotNet.CoreSetup.Test.HostActivation.DependencyResolution { - public class ResolveComponentDependencies : + public class ResolveComponentDependencies : ComponentDependencyResolutionBase, IClassFixture { @@ -97,7 +97,7 @@ namespace Microsoft.DotNet.CoreSetup.Test.HostActivation.DependencyResolution else { // OSPlatform.Linux - // We expect the test to fail due to the the case change of AppDll + // We expect the test to fail due to the case change of AppDll sharedTestState.RunComponentResolutionTest(component) .Should().Fail() .And.HaveStdErrContaining($"Failed to locate managed application [{component.AppDll}]"); @@ -154,7 +154,7 @@ namespace Microsoft.DotNet.CoreSetup.Test.HostActivation.DependencyResolution else { // OSPlatform.Linux - // We expect the test to fail due to the the case change of AppDll + // We expect the test to fail due to the case change of AppDll sharedTestState.RunComponentResolutionTest(component) .Should().Fail() .And.HaveStdErrContaining($"Failed to locate managed application [{component.AppDll}]"); @@ -212,7 +212,7 @@ namespace Microsoft.DotNet.CoreSetup.Test.HostActivation.DependencyResolution else { // OSPlatform.Linux - // We expect the test to fail due to the the case change of AppDll + // We expect the test to fail due to the case change of AppDll sharedTestState.RunComponentResolutionTest(component) .Should().Fail() .And.HaveStdErrContaining($"Failed to locate managed application [{component.AppDll}]"); diff --git a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFx.cs b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFx.cs index dda6a1dd6d1..78f66f90af8 100644 --- a/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFx.cs +++ b/src/installer/tests/HostActivation.Tests/FrameworkResolution/RollForwardOnNoCandidateFx.cs @@ -440,7 +440,7 @@ namespace Microsoft.DotNet.CoreSetup.Test.HostActivation.FrameworkResolution } // Verifies that rollForwardOnNoCandidateFx and applyPatches settings correctly roll - // from a release version 4.0.0 the the closest minor version with the latest patch. + // from a release version 4.0.0 the closest minor version with the latest patch. [Theory] // rollForwardOnNoCandidateFx applyPatches resolvedFramework [InlineData(null, null, "4.1.2")] [InlineData(null, false, "4.1.1")] diff --git a/src/libraries/Common/src/System/Runtime/Versioning/NonVersionableAttribute.cs b/src/libraries/Common/src/System/Runtime/Versioning/NonVersionableAttribute.cs index 5a875af8c9d..96534507456 100644 --- a/src/libraries/Common/src/System/Runtime/Versioning/NonVersionableAttribute.cs +++ b/src/libraries/Common/src/System/Runtime/Versioning/NonVersionableAttribute.cs @@ -12,7 +12,7 @@ ** breaking changes for ReadyToRun. ** ** Applying this type also has the side effect that the inlining tables in R2R images will not -** report that inlining of NonVersionable attributed methods occured. These inlining tables are used +** report that inlining of NonVersionable attributed methods occurred. These inlining tables are used ** by profilers to figure out the set of methods that need to be rejited when one method is instrumented, ** so in effect NonVersionable methods are also non-instrumentable. Generally this is OK for ** extremely trivial low level methods where NonVersionable gets used, but if there is any plan to diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs index 62ff9e0023f..3eb63bce7ea 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComRuntimeHelpers.cs @@ -248,7 +248,7 @@ namespace Microsoft.CSharp.RuntimeBinder.ComInterop Debug.Assert(obj != null); // GetNativeVariantForObject is very expensive for values that marshal as VT_DISPATCH - // also is is extremely common scenario when object at hand is an RCW. + // also it is extremely common scenario when object at hand is an RCW. // Therefore we are going to test for IDispatch before defaulting to GetNativeVariantForObject. if (obj is IDispatch) { diff --git a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpClientFactoryTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpClientFactoryTest.cs index 9a795e2f972..50a806a8a8f 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpClientFactoryTest.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DefaultHttpClientFactoryTest.cs @@ -485,7 +485,7 @@ namespace Microsoft.Extensions.Http kvp = default; } - // Let's verify the the ActiveHandlerTrackingEntry is gone. This would be prevent + // Let's verify the ActiveHandlerTrackingEntry is gone. This would be prevent // the handler from being disposed if it was still rooted. Assert.Empty(factory.ActiveEntryState); diff --git a/src/libraries/System.CodeDom/tests/System/CodeDom/CodeArrayCreateExpressionTests.cs b/src/libraries/System.CodeDom/tests/System/CodeDom/CodeArrayCreateExpressionTests.cs index 1949aaeb9ca..59758f4342f 100644 --- a/src/libraries/System.CodeDom/tests/System/CodeDom/CodeArrayCreateExpressionTests.cs +++ b/src/libraries/System.CodeDom/tests/System/CodeDom/CodeArrayCreateExpressionTests.cs @@ -207,7 +207,7 @@ namespace System.CodeDom.Tests } [Fact] - public void Ctor_NullTypeInInitalizers_ThrowsArgumentNullException() + public void Ctor_NullTypeInInitializers_ThrowsArgumentNullException() { CodePrimitiveExpression[] initializers = new CodePrimitiveExpression[] { null }; AssertExtensions.Throws("value", () => new CodeArrayCreateExpression("", initializers)); diff --git a/src/libraries/System.ComponentModel.Composition.Registration/src/System/ComponentModel/Composition/Registration/PartBuilderOfT.cs b/src/libraries/System.ComponentModel.Composition.Registration/src/System/ComponentModel/Composition/Registration/PartBuilderOfT.cs index 8d8de0c58d7..375d3fd6052 100644 --- a/src/libraries/System.ComponentModel.Composition.Registration/src/System/ComponentModel/Composition/Registration/PartBuilderOfT.cs +++ b/src/libraries/System.ComponentModel.Composition.Registration/src/System/ComponentModel/Composition/Registration/PartBuilderOfT.cs @@ -56,7 +56,7 @@ namespace System.ComponentModel.Composition.Registration } } - // An error occured the expression must be a Property Member Expression + // An error occurred the expression must be a Property Member Expression throw new ArgumentException(SR.Format(SR.Argument_ExpressionMustBePropertyMember, nameof(propertyFilter)), nameof(propertyFilter)); } diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ChangeRejectedException.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ChangeRejectedException.cs index 9284b6a49e4..48090b2306f 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ChangeRejectedException.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ChangeRejectedException.cs @@ -39,7 +39,7 @@ namespace System.ComponentModel.Composition /// /// Initializes a new instance of the class. /// - /// List of errors that occured while applying the changes. + /// List of errors that occurred while applying the changes. public ChangeRejectedException(IEnumerable? errors) : base((string?)null, (Exception?)null, errors) { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ImportEngine.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ImportEngine.cs index 7d6faecf7e4..58587850143 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ImportEngine.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ImportEngine.cs @@ -70,7 +70,7 @@ namespace System.ComponentModel.Composition.Hosting /// /// An error occurred during previewing and is null. /// will contain a collection of errors that occurred. - /// The pre-existing composition is in an unknown state, depending on the errors that occured. + /// The pre-existing composition is in an unknown state, depending on the errors that occurred. /// /// /// An error occurred during the previewing and is not null. @@ -396,7 +396,7 @@ namespace System.ComponentModel.Composition.Hosting } } - // if an error occured while doing a state transition + // if an error occurred while doing a state transition if (!result.Succeeded) { // revert to the previous state and return the error diff --git a/src/libraries/System.Composition/src/System.Composition.csproj b/src/libraries/System.Composition/src/System.Composition.csproj index f49bedb63de..7f054bb7a1b 100644 --- a/src/libraries/System.Composition/src/System.Composition.csproj +++ b/src/libraries/System.Composition/src/System.Composition.csproj @@ -8,7 +8,7 @@ $(NoWarn);NU5128 false - This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web. + This package provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web. Commonly Used Types: System.Composition.ExportAttribute @@ -33,4 +33,4 @@ System.Composition.CompositionContextExtensions - \ No newline at end of file + diff --git a/src/libraries/System.Console/src/System/ConsolePal.Unix.cs b/src/libraries/System.Console/src/System/ConsolePal.Unix.cs index 59f6b292ce8..3e3691f3b4f 100644 --- a/src/libraries/System.Console/src/System/ConsolePal.Unix.cs +++ b/src/libraries/System.Console/src/System/ConsolePal.Unix.cs @@ -30,7 +30,7 @@ namespace System // We also need to invalidate these values when certain signals occur. // We don't want to take the lock in the signal handling thread for this. // Instead, we set a flag. Before reading a cached value, a call to CheckTerminalSettingsInvalidated - // will invalidate the cached values if a signal has occured. + // will invalidate the cached values if a signal has occurred. private static int s_cursorVersion; // Gets incremented each time the cursor position changed. // Used to synchronize between lock (Console.Out) blocks. private static int s_cursorLeft; // Cached CursorLeft, -1 when invalid. diff --git a/src/libraries/System.Data.Common/src/System/Data/DataRow.cs b/src/libraries/System.Data.Common/src/System/Data/DataRow.cs index b9f35e9a651..34679c609c0 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataRow.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataRow.cs @@ -414,7 +414,7 @@ namespace System.Data /// /// Arrays returned from this property will never contain . /// When setting this property, indicates that the current column value - /// should be left as-is. can be used to set the the value to null. + /// should be left as-is. can be used to set the value to null. /// public object?[] ItemArray { diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs index cc22a8b8398..78ffdf1dc16 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs @@ -521,7 +521,7 @@ namespace System.Data.Odbc } } - // initalize the rest to no restrictions + // initialize the rest to no restrictions for (; i < restrictionsCount; i++) { allRestrictions[i] = null; diff --git a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.Shared.cs b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.Shared.cs index d37dd9fc07a..3419d6c350d 100644 --- a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.Shared.cs +++ b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.Shared.cs @@ -497,7 +497,7 @@ namespace System.Data.ProviderBase } catch { - // This should occure for all exceptions, even ADP.UnCatchableExceptions. + // This should occur for all exceptions, even ADP.UnCatchableExceptions. connectionFactory.SetInnerConnectionTo(outerConnection, this); throw; } diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.DateTime.netfx.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.DateTime.netfx.cs index 556a4e3d6d0..6a8ee0c64dc 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.DateTime.netfx.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.DateTime.netfx.cs @@ -42,11 +42,11 @@ namespace System.Diagnostics // sync DateTime and Stopwatch ticks every 2 hours #pragma warning disable CA1823 // suppress unused field warning, as it's used to keep the timer alive - private static readonly Timer syncTimeUpdater = InitalizeSyncTimer(); + private static readonly Timer syncTimeUpdater = InitializeSyncTimer(); #pragma warning restore CA1823 [System.Security.SecuritySafeCritical] - private static Timer InitalizeSyncTimer() + private static Timer InitializeSyncTimer() { Timer timer; // Don't capture the current ExecutionContext and its AsyncLocals onto the timer causing them to live forever diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecordWrittenEventArgs.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecordWrittenEventArgs.cs index 30078c7321e..37b75611c46 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecordWrittenEventArgs.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecordWrittenEventArgs.cs @@ -18,7 +18,7 @@ namespace System.Diagnostics.Eventing.Reader public EventRecord EventRecord { get; } /// - /// If any error occured during subscription, this will be non-null. + /// If any error occurred during subscription, this will be non-null. /// After a notification containing an exception, no more notifications will /// be made for this subscription. /// diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/misc/EnvironmentHelpers.cs b/src/libraries/System.Diagnostics.PerformanceCounter/src/misc/EnvironmentHelpers.cs index 873dd09fb7f..c732b223289 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/misc/EnvironmentHelpers.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/misc/EnvironmentHelpers.cs @@ -10,13 +10,13 @@ namespace System internal static class EnvironmentHelpers { private static volatile bool s_isAppContainerProcess; - private static volatile bool s_isAppContainerProcessInitalized; + private static volatile bool s_isAppContainerProcessInitialized; public static bool IsAppContainerProcess { get { - if (!s_isAppContainerProcessInitalized) + if (!s_isAppContainerProcessInitialized) { if (Environment.OSVersion.Version.Major < 6 || (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor <= 1)) { @@ -28,7 +28,7 @@ namespace System s_isAppContainerProcess = HasAppContainerToken(); } - s_isAppContainerProcessInitalized = true; + s_isAppContainerProcessInitialized = true; } return s_isAppContainerProcess; diff --git a/src/libraries/System.Diagnostics.Process/src/Microsoft/Win32/SafeHandles/SafeProcessHandle.Unix.cs b/src/libraries/System.Diagnostics.Process/src/Microsoft/Win32/SafeHandles/SafeProcessHandle.Unix.cs index 5b66e92e708..f3cac1f1af8 100644 --- a/src/libraries/System.Diagnostics.Process/src/Microsoft/Win32/SafeHandles/SafeProcessHandle.Unix.cs +++ b/src/libraries/System.Diagnostics.Process/src/Microsoft/Win32/SafeHandles/SafeProcessHandle.Unix.cs @@ -21,7 +21,7 @@ namespace Microsoft.Win32.SafeHandles // On Unix, there's no such concept. Instead, the implementation manufactures // a WaitHandle that it manually sets when the process completes; SafeProcessHandle // then just wraps that same WaitHandle instance. This allows consumers that use - // Process.{Safe}Handle to initalize and use a WaitHandle to successfully use it on + // Process.{Safe}Handle to initialize and use a WaitHandle to successfully use it on // Unix as well to wait for the process to complete. private readonly SafeWaitHandle? _handle; diff --git a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.method.regmethod.regclass.cs b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.method.regmethod.regclass.cs index 9daae9ce25e..4ab40934105 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.method.regmethod.regclass.cs +++ b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.method.regmethod.regclass.cs @@ -1011,7 +1011,7 @@ namespace System.Dynamic.Runtime.Tests // ManagedTests.DynamicCSharp.Conformance.dynamic.context.method.regmethod.regclass.regclass034.regclass034 [Fact] - public static void CalledFrom_ImplicitlyTypeArrayInitalizer() + public static void CalledFrom_ImplicitlyTypeArrayInitializer() { string p1 = "Test"; dynamic mc = new MemberClass(); diff --git a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.Text.cs b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.Text.cs index 83862a750eb..fb39a104990 100644 --- a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.Text.cs +++ b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.Text.cs @@ -184,7 +184,7 @@ namespace System.Formats.Asn1 /// /// Reads a character string value from with a specified tag under - /// the specified encoding rules, copying the decoded string into a a provided destination buffer. + /// the specified encoding rules, copying the decoded string into a provided destination buffer. /// /// The buffer containing encoded data. /// The buffer in which to write. diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarFile.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarFile.cs index c156edb9f16..d23eb1f92a1 100644 --- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarFile.cs +++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarFile.cs @@ -83,7 +83,7 @@ namespace System.Formats.Tar } // /// - // /// Asynchronously creates a tar archive from the contents of the specified directory, and outputs them into the specified path. Can optionally include the base directory as the prefix for the the entry names. + // /// Asynchronously creates a tar archive from the contents of the specified directory, and outputs them into the specified path. Can optionally include the base directory as the prefix for the entry names. // /// // /// The path of the directory to archive. // /// The path of the destination archive file. diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarReader.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarReader.cs index 187b5f43c48..2aa5b3875d8 100644 --- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarReader.cs +++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarReader.cs @@ -92,7 +92,7 @@ namespace System.Formats.Tar /// More than one Global Extended Attributes Entry was found in the current archive. /// -or- /// Two or more Extended Attributes entries were found consecutively in the current archive. - /// An I/O problem ocurred. + /// An I/O problem occurred. public TarEntry? GetNextEntry(bool copyData = false) { if (_reachedEndMarkers) diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarWriter.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarWriter.cs index a9bf0d3a9ad..a9efcf84b52 100644 --- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarWriter.cs +++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarWriter.cs @@ -95,7 +95,7 @@ namespace System.Formats.Tar /// The name of the file as it should be represented in the archive. It should include the optional relative path and the filename. /// The archive stream is disposed. /// or is or empty. - /// An I/O problem ocurred. + /// An I/O problem occurred. public void WriteEntry(string fileName, string? entryName) { ThrowIfDisposed(); @@ -160,7 +160,7 @@ namespace System.Formats.Tar /// /// The archive stream is disposed. /// The entry type of the is not supported for writing. - /// An I/O problem ocurred. + /// An I/O problem occurred. public void WriteEntry(TarEntry entry) { ThrowIfDisposed(); diff --git a/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.MultipleWatchers.cs b/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.MultipleWatchers.cs index f819626f37e..b5ab5a8dd34 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.MultipleWatchers.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.MultipleWatchers.cs @@ -113,9 +113,9 @@ namespace System.IO.Tests watcher2.Error += OnError; watcher3.Error += OnError; - AutoResetEvent autoResetEvent1 = WatchCreated(watcher1, new[] { fileName }).EventOccured; - AutoResetEvent autoResetEvent2 = WatchCreated(watcher2, new[] { fileName }).EventOccured; - AutoResetEvent autoResetEvent3 = WatchCreated(watcher3, new[] { fileName }).EventOccured; + AutoResetEvent autoResetEvent1 = WatchCreated(watcher1, new[] { fileName }).EventOccurred; + AutoResetEvent autoResetEvent2 = WatchCreated(watcher2, new[] { fileName }).EventOccurred; + AutoResetEvent autoResetEvent3 = WatchCreated(watcher3, new[] { fileName }).EventOccurred; watcher1.EnableRaisingEvents = true; watcher2.EnableRaisingEvents = true; @@ -148,8 +148,8 @@ namespace System.IO.Tests string fileName1 = Path.Combine(dir1, "file"); string fileName2 = Path.Combine(dir2, "file"); - AutoResetEvent autoResetEvent1 = WatchCreated(watcher1, new[] { fileName1 }).EventOccured; - AutoResetEvent autoResetEvent2 = WatchCreated(watcher2, new[] { fileName2 }).EventOccured; + AutoResetEvent autoResetEvent1 = WatchCreated(watcher1, new[] { fileName1 }).EventOccurred; + AutoResetEvent autoResetEvent2 = WatchCreated(watcher2, new[] { fileName2 }).EventOccurred; watcher1.EnableRaisingEvents = true; watcher2.EnableRaisingEvents = true; @@ -182,7 +182,7 @@ namespace System.IO.Tests { watchers[i] = new FileSystemWatcher(TestDirectory); watchers[i].Filter = Path.GetFileName(fileName); - autoResetEvents[i] = WatchCreated(watchers[i], new[] { fileName }).EventOccured; + autoResetEvents[i] = WatchCreated(watchers[i], new[] { fileName }).EventOccurred; watchers[i].EnableRaisingEvents = true; } @@ -217,7 +217,7 @@ namespace System.IO.Tests { watchers1[i] = new FileSystemWatcher(TestDirectory); watchers1[i].Filter = Path.GetFileName(fileName); - autoResetEvents1[i] = WatchCreated(watchers1[i], new[] { fileName }).EventOccured; + autoResetEvents1[i] = WatchCreated(watchers1[i], new[] { fileName }).EventOccurred; watchers1[i].EnableRaisingEvents = true; } @@ -245,9 +245,9 @@ namespace System.IO.Tests using (var watcher2 = new FileSystemWatcher(TestDirectory, Path.GetFileName(file))) using (var watcher3 = new FileSystemWatcher(TestDirectory, Path.GetFileName(otherFile))) { - AutoResetEvent autoResetEvent1 = WatchChanged(watcher1, new[] { Path.Combine(TestDirectory, "apple") }).EventOccured; - AutoResetEvent autoResetEvent2 = WatchChanged(watcher2, new[] { Path.Combine(TestDirectory, "apple") }).EventOccured; - AutoResetEvent autoResetEvent3 = WatchChanged(watcher3, new[] { Path.Combine(TestDirectory, "pear") }).EventOccured; + AutoResetEvent autoResetEvent1 = WatchChanged(watcher1, new[] { Path.Combine(TestDirectory, "apple") }).EventOccurred; + AutoResetEvent autoResetEvent2 = WatchChanged(watcher2, new[] { Path.Combine(TestDirectory, "apple") }).EventOccurred; + AutoResetEvent autoResetEvent3 = WatchChanged(watcher3, new[] { Path.Combine(TestDirectory, "pear") }).EventOccurred; watcher1.Error += OnError; watcher2.Error += OnError; @@ -295,9 +295,9 @@ namespace System.IO.Tests watcher2.Error += OnError; watcher3.Error += OnError; - AutoResetEvent autoResetEvent1 = WatchDeleted(watcher1, new[] { fileName }, _output).EventOccured; - AutoResetEvent autoResetEvent2 = WatchDeleted(watcher2, new[] { fileName }, _output).EventOccured; - AutoResetEvent autoResetEvent3 = WatchDeleted(watcher3, new[] { fileName }, _output).EventOccured; + AutoResetEvent autoResetEvent1 = WatchDeleted(watcher1, new[] { fileName }, _output).EventOccurred; + AutoResetEvent autoResetEvent2 = WatchDeleted(watcher2, new[] { fileName }, _output).EventOccurred; + AutoResetEvent autoResetEvent3 = WatchDeleted(watcher3, new[] { fileName }, _output).EventOccurred; watcher1.EnableRaisingEvents = true; watcher2.EnableRaisingEvents = true; @@ -327,8 +327,8 @@ namespace System.IO.Tests string filePath = file; string filePathRenamed = file + "_renamed"; - AutoResetEvent autoResetEvent1 = WatchRenamed(watcher1, new[] { filePathRenamed }, _output).EventOccured; - AutoResetEvent autoResetEvent2 = WatchRenamed(watcher2, new[] { filePathRenamed }, _output).EventOccured; + AutoResetEvent autoResetEvent1 = WatchRenamed(watcher1, new[] { filePathRenamed }, _output).EventOccurred; + AutoResetEvent autoResetEvent2 = WatchRenamed(watcher2, new[] { filePathRenamed }, _output).EventOccurred; watcher1.Error += OnError; watcher2.Error += OnError; diff --git a/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs b/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs index a0b042d772e..e908b65eee0 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs @@ -102,7 +102,7 @@ namespace System.IO.Tests Assert.Throws("path", () => new FileSystemWatcher(null, null)); Assert.Throws("path", () => new FileSystemWatcher(null)); Assert.Throws("path", () => new FileSystemWatcher(null, "*")); - + } [Fact] @@ -187,7 +187,7 @@ namespace System.IO.Tests watcher.EnableRaisingEvents = false; Assert.False(watcher.EnableRaisingEvents); - + } [Fact] @@ -459,7 +459,7 @@ namespace System.IO.Tests string file = CreateTestFile(TestDirectory, "file"); using (var fsw = new FileSystemWatcher(TestDirectory)) { - AutoResetEvent eventOccurred = WatchRenamed(fsw).EventOccured; + AutoResetEvent eventOccurred = WatchRenamed(fsw).EventOccurred; string newPath = Path.Combine(TestDirectory, "newPath"); @@ -563,7 +563,7 @@ namespace System.IO.Tests File.SetLastWriteTime(filePath, File.GetLastWriteTime(filePath).AddDays(1)); Assert.True(are.WaitOne(10000)); Assert.Throws(() => watcher.EnableRaisingEvents = true); - + } [Fact] @@ -572,7 +572,7 @@ namespace System.IO.Tests string dir = CreateTestDirectory(TestDirectory, "dir"); using (var fsw = new FileSystemWatcher(dir)) { - AutoResetEvent are = WatchCreated(fsw).EventOccured; + AutoResetEvent are = WatchCreated(fsw).EventOccurred; fsw.Filter = "*"; fsw.EnableRaisingEvents = true; @@ -871,7 +871,7 @@ namespace System.IO.Tests watcher.Filters.Clear(); Assert.Equal("*", watcher.Filter); Assert.Equal(new string[] { }, watcher.Filters); - + } [Fact] @@ -886,7 +886,7 @@ namespace System.IO.Tests Assert.Equal(0, watcher.Filters.Count); Assert.Empty(watcher.Filters); Assert.NotNull(watcher.Filters); - + } [Fact] @@ -917,7 +917,7 @@ namespace System.IO.Tests watcher.Filters.Clear(); Assert.Equal("*", watcher.Filter); - + } [Fact] @@ -926,7 +926,7 @@ namespace System.IO.Tests var watcher = new FileSystemWatcher(TestDirectory, "*.pdb"); watcher.Filters.Add("foo"); Assert.Equal(new string[] { "*.pdb", "foo" }, watcher.Filters); - + } [Fact] diff --git a/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs b/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs index 0cedd3954e7..a1b6fa0591f 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs @@ -34,7 +34,7 @@ namespace System.IO.Tests /// Watches the Changed WatcherChangeType and unblocks the returned AutoResetEvent when a /// Changed event is thrown by the watcher. /// - public static (AutoResetEvent EventOccured, FileSystemEventHandler Handler) WatchChanged(FileSystemWatcher watcher, string[] expectedPaths = null) + public static (AutoResetEvent EventOccurred, FileSystemEventHandler Handler) WatchChanged(FileSystemWatcher watcher, string[] expectedPaths = null) { AutoResetEvent eventOccurred = new AutoResetEvent(false); @@ -56,7 +56,7 @@ namespace System.IO.Tests /// Watches the Created WatcherChangeType and unblocks the returned AutoResetEvent when a /// Created event is thrown by the watcher. /// - public static (AutoResetEvent EventOccured, FileSystemEventHandler Handler) WatchCreated(FileSystemWatcher watcher, string[] expectedPaths = null, ITestOutputHelper _output = null) + public static (AutoResetEvent EventOccurred, FileSystemEventHandler Handler) WatchCreated(FileSystemWatcher watcher, string[] expectedPaths = null, ITestOutputHelper _output = null) { AutoResetEvent eventOccurred = new AutoResetEvent(false); @@ -84,7 +84,7 @@ namespace System.IO.Tests /// Watches the Renamed WatcherChangeType and unblocks the returned AutoResetEvent when a /// Renamed event is thrown by the watcher. /// - public static (AutoResetEvent EventOccured, FileSystemEventHandler Handler) WatchDeleted(FileSystemWatcher watcher, string[] expectedPaths = null, ITestOutputHelper _output = null) + public static (AutoResetEvent EventOccurred, FileSystemEventHandler Handler) WatchDeleted(FileSystemWatcher watcher, string[] expectedPaths = null, ITestOutputHelper _output = null) { AutoResetEvent eventOccurred = new AutoResetEvent(false); FileSystemEventHandler handler = (o, e) => @@ -109,7 +109,7 @@ namespace System.IO.Tests /// Watches the Renamed WatcherChangeType and unblocks the returned AutoResetEvent when a /// Renamed event is thrown by the watcher. /// - public static (AutoResetEvent EventOccured, RenamedEventHandler Handler) WatchRenamed(FileSystemWatcher watcher, string[] expectedPaths = null, ITestOutputHelper _output = null) + public static (AutoResetEvent EventOccurred, RenamedEventHandler Handler) WatchRenamed(FileSystemWatcher watcher, string[] expectedPaths = null, ITestOutputHelper _output = null) { AutoResetEvent eventOccurred = new AutoResetEvent(false); @@ -275,7 +275,7 @@ namespace System.IO.Tests public static void ExpectNoEvent(FileSystemWatcher watcher, WatcherChangeTypes unExpectedEvents, Action action, Action cleanup = null, string expectedPath = null, int timeout = WaitForExpectedEventTimeout) { bool result = ExecuteAndVerifyEvents(watcher, unExpectedEvents, action, false, expectedPath == null ? null : new string[] { expectedPath }, timeout); - Assert.False(result, "Expected Event occured"); + Assert.False(result, "Expected Event occurred"); if (cleanup != null) cleanup(); @@ -293,8 +293,8 @@ namespace System.IO.Tests public static bool ExecuteAndVerifyEvents(FileSystemWatcher watcher, WatcherChangeTypes expectedEvents, Action action, bool assertExpected, string[] expectedPaths, int timeout) { bool result = true, verifyChanged = true, verifyCreated = true, verifyDeleted = true, verifyRenamed = true; - (AutoResetEvent EventOccured, FileSystemEventHandler Handler) changed = default, created = default, deleted = default; - (AutoResetEvent EventOccured, RenamedEventHandler Handler) renamed = default; + (AutoResetEvent EventOccurred, FileSystemEventHandler Handler) changed = default, created = default, deleted = default; + (AutoResetEvent EventOccurred, RenamedEventHandler Handler) renamed = default; if (verifyChanged = ((expectedEvents & WatcherChangeTypes.Changed) > 0)) changed = WatchChanged(watcher, expectedPaths); @@ -312,7 +312,7 @@ namespace System.IO.Tests if (verifyChanged) { bool Changed_expected = ((expectedEvents & WatcherChangeTypes.Changed) > 0); - bool Changed_actual = changed.EventOccured.WaitOne(timeout); + bool Changed_actual = changed.EventOccurred.WaitOne(timeout); watcher.Changed -= changed.Handler; result = Changed_expected == Changed_actual; if (assertExpected) @@ -323,7 +323,7 @@ namespace System.IO.Tests if (verifyCreated) { bool Created_expected = ((expectedEvents & WatcherChangeTypes.Created) > 0); - bool Created_actual = created.EventOccured.WaitOne(verifyChanged ? SubsequentExpectedWait : timeout); + bool Created_actual = created.EventOccurred.WaitOne(verifyChanged ? SubsequentExpectedWait : timeout); watcher.Created -= created.Handler; result = result && Created_expected == Created_actual; if (assertExpected) @@ -334,7 +334,7 @@ namespace System.IO.Tests if (verifyDeleted) { bool Deleted_expected = ((expectedEvents & WatcherChangeTypes.Deleted) > 0); - bool Deleted_actual = deleted.EventOccured.WaitOne(verifyChanged || verifyCreated ? SubsequentExpectedWait : timeout); + bool Deleted_actual = deleted.EventOccurred.WaitOne(verifyChanged || verifyCreated ? SubsequentExpectedWait : timeout); watcher.Deleted -= deleted.Handler; result = result && Deleted_expected == Deleted_actual; if (assertExpected) @@ -345,7 +345,7 @@ namespace System.IO.Tests if (verifyRenamed) { bool Renamed_expected = ((expectedEvents & WatcherChangeTypes.Renamed) > 0); - bool Renamed_actual = renamed.EventOccured.WaitOne(verifyChanged || verifyCreated || verifyDeleted ? SubsequentExpectedWait : timeout); + bool Renamed_actual = renamed.EventOccurred.WaitOne(verifyChanged || verifyCreated || verifyDeleted ? SubsequentExpectedWait : timeout); watcher.Renamed -= renamed.Handler; result = result && Renamed_expected == Renamed_actual; if (assertExpected) @@ -508,7 +508,7 @@ namespace System.IO.Tests // Observe until an expected count of events is triggered, otherwise fail. Return all collected events. internal static List ExpectEvents(FileSystemWatcher watcher, int expectedEvents, Action action) { - using var eventsOccured = new AutoResetEvent(false); + using var eventsOccurred = new AutoResetEvent(false); var eventsOrrures = 0; var events = new List(); @@ -531,7 +531,7 @@ namespace System.IO.Tests try { action(); - eventsOccured.WaitOne(new TimeSpan(0, 0, 5)); + eventsOccurred.WaitOne(new TimeSpan(0, 0, 5)); } finally { @@ -555,7 +555,7 @@ namespace System.IO.Tests events.Add(new FiredEvent(eventType, dir1, dir2)); if (Interlocked.Increment(ref eventsOrrures) == expectedEvents) { - eventsOccured.Set(); + eventsOccurred.Set(); } } } diff --git a/src/libraries/System.Linq/src/System/Linq/Select.cs b/src/libraries/System.Linq/src/System/Linq/Select.cs index c3414ca7769..9c0c576bbc1 100644 --- a/src/libraries/System.Linq/src/System/Linq/Select.cs +++ b/src/libraries/System.Linq/src/System/Linq/Select.cs @@ -151,7 +151,7 @@ namespace System.Linq } /// - /// An iterator that maps each item of a array. + /// An iterator that maps each item of an array. /// /// The type of the source array. /// The type of the mapped items. diff --git a/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs b/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs index 16345b47497..53997ce2424 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs @@ -190,7 +190,7 @@ namespace System.Management // // The wbemObject is changed from a field to a property. This is to avoid major code churn and simplify the solution to - // the problem where the Initialize call actually binds to the object. This occured even in cases like Get() whereby we + // the problem where the Initialize call actually binds to the object. This occurred even in cases like Get() whereby we // ended up getting the object twice. Any direct usage of this property will cause a call to Initialize ( true ) to be made // (if not already done) indicating that we wish to bind to the underlying WMI object. // diff --git a/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs b/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs index 26b33f95296..8d37ccdb2c8 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs @@ -701,7 +701,7 @@ namespace System.Management // // Try catch the call to cancel. In this case the cancel is being done without the client // knowing about it so catching all exceptions is not a bad thing to do. If a client calls - // Stop (which calls Cancel), they will still receive any exceptions that may have occured. + // Stop (which calls Cancel), they will still receive any exceptions that may have occurred. // try { diff --git a/src/libraries/System.Memory/tests/Base64/Base64DecoderUnitTests.cs b/src/libraries/System.Memory/tests/Base64/Base64DecoderUnitTests.cs index 7a1112fd206..92e88fee8e9 100644 --- a/src/libraries/System.Memory/tests/Base64/Base64DecoderUnitTests.cs +++ b/src/libraries/System.Memory/tests/Base64/Base64DecoderUnitTests.cs @@ -21,7 +21,7 @@ namespace System.Buffers.Text.Tests } while (numBytes % 4 != 0); // ensure we have a valid length Span source = new byte[numBytes]; - Base64TestHelper.InitalizeDecodableBytes(source, numBytes); + Base64TestHelper.InitializeDecodableBytes(source, numBytes); Span decodedBytes = new byte[Base64.GetMaxDecodedFromUtf8Length(source.Length)]; Assert.Equal(OperationStatus.Done, Base64.DecodeFromUtf8(source, decodedBytes, out int consumed, out int decodedByteCount)); @@ -44,7 +44,7 @@ namespace System.Buffers.Text.Tests } while (numBytes % 4 == 0); // ensure we have a invalid length Span source = new byte[numBytes]; - Base64TestHelper.InitalizeDecodableBytes(source, numBytes); + Base64TestHelper.InitializeDecodableBytes(source, numBytes); Span decodedBytes = new byte[Base64.GetMaxDecodedFromUtf8Length(source.Length)]; int expectedConsumed = numBytes / 4 * 4; // decode input up to the closest multiple of 4 @@ -70,7 +70,7 @@ namespace System.Buffers.Text.Tests } while (numBytes % 4 != 0); // ensure we have a valid length Span source = new byte[numBytes]; - Base64TestHelper.InitalizeDecodableBytes(source, numBytes); + Base64TestHelper.InitializeDecodableBytes(source, numBytes); Span decodedBytes = new byte[Base64.GetMaxDecodedFromUtf8Length(source.Length)]; int expectedConsumed = source.Length / 4 * 4; // only consume closest multiple of four since isFinalBlock is false @@ -95,7 +95,7 @@ namespace System.Buffers.Text.Tests } while (numBytes % 4 == 0); // ensure we have a invalid length Span source = new byte[numBytes]; - Base64TestHelper.InitalizeDecodableBytes(source, numBytes); + Base64TestHelper.InitializeDecodableBytes(source, numBytes); Span decodedBytes = new byte[Base64.GetMaxDecodedFromUtf8Length(source.Length)]; int expectedConsumed = source.Length / 4 * 4; // only consume closest multiple of four since isFinalBlock is false @@ -140,7 +140,7 @@ namespace System.Buffers.Text.Tests for (int numBytes = 5; numBytes < 20; numBytes++) { Span source = new byte[numBytes]; - Base64TestHelper.InitalizeDecodableBytes(source, numBytes); + Base64TestHelper.InitializeDecodableBytes(source, numBytes); Span decodedBytes = new byte[3]; int consumed, written; @@ -163,7 +163,7 @@ namespace System.Buffers.Text.Tests // Output too small even with padding characters in the input { Span source = new byte[12]; - Base64TestHelper.InitalizeDecodableBytes(source); + Base64TestHelper.InitializeDecodableBytes(source); source[10] = Base64TestHelper.EncodingPad; source[11] = Base64TestHelper.EncodingPad; @@ -177,7 +177,7 @@ namespace System.Buffers.Text.Tests { Span source = new byte[12]; - Base64TestHelper.InitalizeDecodableBytes(source); + Base64TestHelper.InitializeDecodableBytes(source); source[11] = Base64TestHelper.EncodingPad; Span decodedBytes = new byte[7]; @@ -195,7 +195,7 @@ namespace System.Buffers.Text.Tests for (int numBytes = 8; numBytes < 20; numBytes++) { Span source = new byte[numBytes]; - Base64TestHelper.InitalizeDecodableBytes(source, numBytes); + Base64TestHelper.InitializeDecodableBytes(source, numBytes); Span decodedBytes = new byte[4]; int consumed, written; @@ -215,7 +215,7 @@ namespace System.Buffers.Text.Tests public void DecodingOutputTooSmallRetry(bool isFinalBlock) { Span source = new byte[1000]; - Base64TestHelper.InitalizeDecodableBytes(source); + Base64TestHelper.InitializeDecodableBytes(source); int outputSize = 240; int requiredSize = Base64.GetMaxDecodedFromUtf8Length(source.Length); @@ -490,7 +490,7 @@ namespace System.Buffers.Text.Tests for (int numberOfBytesToTest = 0; numberOfBytesToTest <= numberOfBytes; numberOfBytesToTest += 4) { Span testBytes = new byte[numberOfBytes]; - Base64TestHelper.InitalizeDecodableBytes(testBytes); + Base64TestHelper.InitializeDecodableBytes(testBytes); string sourceString = Encoding.ASCII.GetString(testBytes.Slice(0, numberOfBytesToTest).ToArray()); Span expectedBytes = Convert.FromBase64String(sourceString); diff --git a/src/libraries/System.Memory/tests/Base64/Base64EncoderUnitTests.cs b/src/libraries/System.Memory/tests/Base64/Base64EncoderUnitTests.cs index 54f17341e6f..da2d1b9d38b 100644 --- a/src/libraries/System.Memory/tests/Base64/Base64EncoderUnitTests.cs +++ b/src/libraries/System.Memory/tests/Base64/Base64EncoderUnitTests.cs @@ -47,7 +47,7 @@ namespace System.Buffers.Text.Tests { int numBytes = rnd.Next(100, 1000 * 1000); Span source = new byte[numBytes]; - Base64TestHelper.InitalizeBytes(source, numBytes); + Base64TestHelper.InitializeBytes(source, numBytes); Span encodedBytes = new byte[Base64.GetMaxEncodedToUtf8Length(source.Length)]; Assert.Equal(OperationStatus.Done, Base64.EncodeToUtf8(source, encodedBytes, out int consumed, out int encodedBytesCount)); @@ -65,7 +65,7 @@ namespace System.Buffers.Text.Tests { int numBytes = rnd.Next(100, 1000 * 1000); Span source = new byte[numBytes]; - Base64TestHelper.InitalizeBytes(source, numBytes); + Base64TestHelper.InitializeBytes(source, numBytes); Span encodedBytes = new byte[Base64.GetMaxEncodedToUtf8Length(source.Length)]; int expectedConsumed = source.Length / 3 * 3; // only consume closest multiple of three since isFinalBlock is false @@ -155,7 +155,7 @@ namespace System.Buffers.Text.Tests for (int numBytes = 4; numBytes < 20; numBytes++) { Span source = new byte[numBytes]; - Base64TestHelper.InitalizeBytes(source, numBytes); + Base64TestHelper.InitializeBytes(source, numBytes); Span encodedBytes = new byte[4]; Assert.Equal(OperationStatus.DestinationTooSmall, Base64.EncodeToUtf8(source, encodedBytes, out int consumed, out int written, isFinalBlock)); @@ -172,7 +172,7 @@ namespace System.Buffers.Text.Tests public void EncodingOutputTooSmallRetry(bool isFinalBlock) { Span source = new byte[750]; - Base64TestHelper.InitalizeBytes(source); + Base64TestHelper.InitializeBytes(source); int outputSize = 320; int requiredSize = Base64.GetMaxEncodedToUtf8Length(source.Length); @@ -264,7 +264,7 @@ namespace System.Buffers.Text.Tests { const int numberOfBytes = 15; Span testBytes = new byte[numberOfBytes / 3 * 4]; // slack since encoding inflates the data - Base64TestHelper.InitalizeBytes(testBytes); + Base64TestHelper.InitializeBytes(testBytes); for (int numberOfBytesToTest = 0; numberOfBytesToTest <= numberOfBytes; numberOfBytesToTest++) { diff --git a/src/libraries/System.Memory/tests/Base64/Base64TestHelper.cs b/src/libraries/System.Memory/tests/Base64/Base64TestHelper.cs index 05ad291fb48..417f1994e02 100644 --- a/src/libraries/System.Memory/tests/Base64/Base64TestHelper.cs +++ b/src/libraries/System.Memory/tests/Base64/Base64TestHelper.cs @@ -58,7 +58,7 @@ namespace System.Buffers.Text.Tests } } - internal static void InitalizeBytes(Span bytes, int seed = 100) + internal static void InitializeBytes(Span bytes, int seed = 100) { var rnd = new Random(seed); for (int i = 0; i < bytes.Length; i++) @@ -67,7 +67,7 @@ namespace System.Buffers.Text.Tests } } - internal static void InitalizeDecodableBytes(Span bytes, int seed = 100) + internal static void InitializeDecodableBytes(Span bytes, int seed = 100) { var rnd = new Random(seed); for (int i = 0; i < bytes.Length; i++) diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.AnyOS.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.AnyOS.cs index 3c9c930f08a..a3609e4909e 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.AnyOS.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.AnyOS.cs @@ -63,7 +63,7 @@ namespace System.Net.Http // The cumulative number of HTTP requests failed since the process started. // Failed means that an exception occurred during the handler's Send(Async) call as a result of a connection related error, timeout, or explicitly cancelled. - // In case of using HttpClient's SendAsync(and friends) with buffering, this includes exceptions that occured while buffering the response content + // In case of using HttpClient's SendAsync(and friends) with buffering, this includes exceptions that occurred while buffering the response content // In case of using HttpClient's helper methods (GetString/ByteArray/Stream), this includes responses with non-success status codes _failedRequestsCounter ??= new PollingCounter("requests-failed", this, () => Interlocked.Read(ref _failedRequests)) { diff --git a/src/libraries/System.Net.Mail/tests/Unit/MailAddressTests/MailAddressParserTest.cs b/src/libraries/System.Net.Mail/tests/Unit/MailAddressTests/MailAddressParserTest.cs index 3b73d98939d..0a632a43c7d 100644 --- a/src/libraries/System.Net.Mail/tests/Unit/MailAddressTests/MailAddressParserTest.cs +++ b/src/libraries/System.Net.Mail/tests/Unit/MailAddressTests/MailAddressParserTest.cs @@ -440,7 +440,7 @@ namespace System.Net.Mail.Tests } [Fact] - public void MailAddress_WithDisplayNameParamiterQuotes_ShouldReadCorrectly() + public void MailAddress_WithDisplayNameParameterQuotes_ShouldReadCorrectly() { MailAddress result = new MailAddress("display username@domain", "\"quoted display\""); @@ -450,7 +450,7 @@ namespace System.Net.Mail.Tests } [Fact] - public void MailAddress_WithDisplayNameParamiterNoQuotes_ShouldReadCorrectly() + public void MailAddress_WithDisplayNameParameterNoQuotes_ShouldReadCorrectly() { MailAddress result = new MailAddress("display username@domain", "quoted display"); diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs index dc5dc82ad79..2b8ea339f92 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs @@ -67,7 +67,7 @@ namespace System.Net.NetworkInformation } } - // Executing user callbacks if Availability Change event occured. + // Executing user callbacks if Availability Change event occurred. if (availabilityChangedSubscribers != null) { bool isAvailable = s_isAvailable; diff --git a/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/Ping.PingUtility.cs b/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/Ping.PingUtility.cs index dc22063a5aa..7bdc4120cdb 100644 --- a/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/Ping.PingUtility.cs +++ b/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/Ping.PingUtility.cs @@ -108,7 +108,7 @@ namespace System.Net.NetworkInformation // Throw timeout for known failure return codes from ping functions. if (exitCode == 1 || exitCode == 2) { - // TTL exceeded may have occured + // TTL exceeded may have occurred if (TryParseTtlExceeded(stdout, out PingReply? reply)) { return reply!; diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/TlsCipherSuiteNameParser.ttinclude b/src/libraries/System.Net.Security/src/System/Net/Security/TlsCipherSuiteNameParser.ttinclude index 65dd43c51b1..7a3dee3296d 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/TlsCipherSuiteNameParser.ttinclude +++ b/src/libraries/System.Net.Security/src/System/Net/Security/TlsCipherSuiteNameParser.ttinclude @@ -236,7 +236,7 @@ class CipherSuiteNameData break; case "WITH": // means: just PSK break; - default: throw new Exception($"Token `{Peek()}` has occured after PSK and it is not known. Name: {_name}"); + default: throw new Exception($"Token `{Peek()}` has occurred after PSK and it is not known. Name: {_name}"); } } @@ -268,7 +268,7 @@ class CipherSuiteNameData // no changes needed break; default: - throw new Exception($"`anon` ocurred after `{ret}` which was unexpected. Name: {_name}"); + throw new Exception($"`anon` occurred after `{ret}` which was unexpected. Name: {_name}"); } } @@ -281,7 +281,7 @@ class CipherSuiteNameData case ExchangeAlgorithmType.DiffieHellmanStatic: break; default: - throw new Exception($"`EXPORT` ocurred after `{ret}` which was unexpected. Name: {_name}"); + throw new Exception($"`EXPORT` occurred after `{ret}` which was unexpected. Name: {_name}"); } Next(); } diff --git a/src/libraries/System.Net.Security/tests/StressTests/SslStress/Utils/StressTaskExtensions.cs b/src/libraries/System.Net.Security/tests/StressTests/SslStress/Utils/StressTaskExtensions.cs index 8399dbec190..b3c134760ab 100644 --- a/src/libraries/System.Net.Security/tests/StressTests/SslStress/Utils/StressTaskExtensions.cs +++ b/src/libraries/System.Net.Security/tests/StressTests/SslStress/Utils/StressTaskExtensions.cs @@ -14,7 +14,7 @@ namespace SslStress.Utils /// /// Starts and awaits a collection of cancellable tasks. - /// Will surface the first exception that has occured (instead of AggregateException) + /// Will surface the first exception that has occurred (instead of AggregateException) /// and trigger cancellation for all sibling tasks. /// /// diff --git a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketDeflateOptions.cs b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketDeflateOptions.cs index e497751db28..f361af0bce2 100644 --- a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketDeflateOptions.cs +++ b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketDeflateOptions.cs @@ -35,7 +35,7 @@ namespace System.Net.WebSockets } /// - /// When true the client-side of the connection indicates that it will persist the deflate context accross messages. + /// When true the client-side of the connection indicates that it will persist the deflate context across messages. /// The default is true. /// /// https://tools.ietf.org/html/rfc7692#section-7.1.1.2 @@ -62,7 +62,7 @@ namespace System.Net.WebSockets } /// - /// When true the server-side of the connection indicates that it will persist the deflate context accross messages. + /// When true the server-side of the connection indicates that it will persist the deflate context across messages. /// The default is true. /// /// https://tools.ietf.org/html/rfc7692#section-7.1.1.1 diff --git a/src/libraries/System.Private.CoreLib/Tools/GenUnicodeProp/Program.cs b/src/libraries/System.Private.CoreLib/Tools/GenUnicodeProp/Program.cs index 4bd6041c4e1..1bedbc6de8a 100644 --- a/src/libraries/System.Private.CoreLib/Tools/GenUnicodeProp/Program.cs +++ b/src/libraries/System.Private.CoreLib/Tools/GenUnicodeProp/Program.cs @@ -37,7 +37,7 @@ namespace GenUnicodeProp // Next, iterate though all assigned code points, populating // the category casing & numeric grapheme maps. Also put the - // data into the the DataTable structure, which will compute + // data into the DataTable structure, which will compute // the tiered offset tables. DataTable categoryCasingTable = new DataTable(); diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs index 9107c4f375d..b77d3a2e43b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs @@ -112,7 +112,7 @@ namespace System.Collections.Generic return; } - // This is not currently a true .AddRange as it needs to be an initalized dictionary + // This is not currently a true .AddRange as it needs to be an initialized dictionary // of the correct size, and also an empty dictionary with no current entities (and no argument checks). Debug.Assert(source._entries is not null); Debug.Assert(_entries is not null); diff --git a/src/libraries/System.Private.CoreLib/src/System/GCMemoryInfo.cs b/src/libraries/System.Private.CoreLib/src/System/GCMemoryInfo.cs index 4a75f254eaa..bfee02cbd30 100644 --- a/src/libraries/System.Private.CoreLib/src/System/GCMemoryInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/GCMemoryInfo.cs @@ -104,17 +104,17 @@ namespace System } /// - /// High memory load threshold when this GC occured + /// High memory load threshold when this GC occurred /// public long HighMemoryLoadThresholdBytes => _data._highMemoryLoadThresholdBytes; /// - /// Memory load when this GC ocurred + /// Memory load when this GC occurred /// public long MemoryLoadBytes => _data._memoryLoadBytes; /// - /// Total available memory for the GC to use when this GC ocurred. + /// Total available memory for the GC to use when this GC occurred. /// /// If the environment variable COMPlus_GCHeapHardLimit is set, /// or "Server.GC.HeapHardLimit" is in runtimeconfig.json, this will come from that. @@ -124,12 +124,12 @@ namespace System public long TotalAvailableMemoryBytes => _data._totalAvailableMemoryBytes; /// - /// The total heap size when this GC ocurred + /// The total heap size when this GC occurred /// public long HeapSizeBytes => _data._heapSizeBytes; /// - /// The total fragmentation when this GC ocurred + /// The total fragmentation when this GC occurred /// /// Let's take the example below: /// | OBJ_A | OBJ_B | OBJ_C | OBJ_D | OBJ_E | diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormatInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormatInfo.cs index 65859a6d32a..8f9a55509bf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormatInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormatInfo.cs @@ -249,7 +249,7 @@ namespace System.Globalization private void InitializeOverridableProperties(CultureData cultureData, CalendarId calendarId) { Debug.Assert(cultureData != null); - Debug.Assert(calendarId != CalendarId.UNINITIALIZED_VALUE, "[DateTimeFormatInfo.Populate] Expected initalized calendarId"); + Debug.Assert(calendarId != CalendarId.UNINITIALIZED_VALUE, "[DateTimeFormatInfo.Populate] Expected initialized calendarId"); if (firstDayOfWeek == -1) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.HillClimbing.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.HillClimbing.cs index 7cb860621e3..4329d78ae1e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.HillClimbing.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.HillClimbing.cs @@ -224,7 +224,7 @@ namespace System.Threading double adjacentPeriod2 = sampleCount / (((double)sampleCount / _wavePeriod) - 1); // - // Get the the three different frequency components of the throughput (scaled by average + // Get the three different frequency components of the throughput (scaled by average // throughput). Our "error" estimate (the amount of noise that might be present in the // frequency band we're really interested in) is the average of the adjacent bands. // diff --git a/src/libraries/System.Private.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSObject.References.cs b/src/libraries/System.Private.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSObject.References.cs index 60e8b539899..407cf221369 100644 --- a/src/libraries/System.Private.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSObject.References.cs +++ b/src/libraries/System.Private.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSObject.References.cs @@ -55,7 +55,7 @@ namespace System.Runtime.InteropServices.JavaScript } // Note that we could not use SafeHandle.DangerousAddRef() and DangerousRelease() - // because we could get to zero InFlightCounter multiple times accross lifetime of the JSObject + // because we could get to zero InFlightCounter multiple times across lifetime of the JSObject // we only want JSObject to be disposed (from GC finalizer) once there is no in-flight reference and also no natural C# reference internal void ReleaseInFlight() { diff --git a/src/libraries/System.Private.Uri/tests/FunctionalTests/UriBuilderParameterTest.cs b/src/libraries/System.Private.Uri/tests/FunctionalTests/UriBuilderParameterTest.cs index f5bee016040..b3fc71752be 100644 --- a/src/libraries/System.Private.Uri/tests/FunctionalTests/UriBuilderParameterTest.cs +++ b/src/libraries/System.Private.Uri/tests/FunctionalTests/UriBuilderParameterTest.cs @@ -5,9 +5,6 @@ using Xunit; namespace System.PrivateUri.Tests { - /// - /// Summary description for UriBuilderParamiterTest - /// public class UriBuilderParameterTest { [Fact] diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidator.cs index 45ae2c306a0..a37bc74bf47 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidator.cs @@ -2414,7 +2414,7 @@ namespace System.Xml.Schema else if (constraints[i].qualifiedTable!.Contains(ks)) { // unique or key checking value confliction - // for redundant key, reporting both occurings + // for redundant key, reporting both occurrings // doesn't work... how can i retrieve value out?? // KeySequence ks2 = (KeySequence) conuct.qualifiedTable[ks]; SendValidationEvent(new XmlSchemaValidationException(SR.Sch_DuplicateKey, diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdValidator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdValidator.cs index fe493a5a7de..3ae730e42d5 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdValidator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdValidator.cs @@ -1087,7 +1087,7 @@ namespace System.Xml.Schema else if (constraints[i].qualifiedTable!.Contains(ks)) { // unique or key checking value confliction - // for redundant key, reporting both occurings + // for redundant key, reporting both occurrings // doesn't work... how can i retrieve value out?? SendValidationEvent(new XmlSchemaException(SR.Sch_DuplicateKey, new string[2] { ks.ToString(), constraints[i].constraint.name.ToString() }, diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilGenerator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilGenerator.cs index a3635fd2b34..0d004975a39 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilGenerator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilGenerator.cs @@ -239,7 +239,7 @@ namespace System.Xml.Xsl.Xslt { // Initialization code should be executed before any other code (global variables/parameters or root expression) // For this purpose we insert it as THE FIRST global variable $init (global variables are calculated before global parameters) - // and put all initalization code in it. + // and put all initialization code in it. // In retail mode global variables are calculated lasely if they don't have side effects. // To mark $init as variable with side effect we put all code to function and set SideEffect flag on this function. // ILGen expects that all library functions are sideeffect free. To prevent calls to RegisterDecimalFormat() to be optimized out diff --git a/src/libraries/System.Reflection.Emit/tests/ModuleBuilder/ModuleBuilderDefineUninitializedData.cs b/src/libraries/System.Reflection.Emit/tests/ModuleBuilder/ModuleBuilderDefineUninitializedData.cs index df2573428a1..79e84dba873 100644 --- a/src/libraries/System.Reflection.Emit/tests/ModuleBuilder/ModuleBuilderDefineUninitializedData.cs +++ b/src/libraries/System.Reflection.Emit/tests/ModuleBuilder/ModuleBuilderDefineUninitializedData.cs @@ -76,7 +76,7 @@ namespace System.Reflection.Emit.Tests [Theory] [MemberData(nameof(Attributes_TestData))] - public void DefineUninitalizedData_CreateGlobalFunctionsAlreadyCalled_ThrowsInvalidOperationException(FieldAttributes attributes) + public void DefineUninitializedData_CreateGlobalFunctionsAlreadyCalled_ThrowsInvalidOperationException(FieldAttributes attributes) { ModuleBuilder module = Helpers.DynamicModule(); module.CreateGlobalFunctions(); diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportFixer.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportFixer.cs index fe53cd1a0f1..03d454fb714 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportFixer.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportFixer.cs @@ -367,7 +367,7 @@ namespace Microsoft.Interop.Analyzers LocalDeclarationStatementSyntax declaration = invocation.FirstAncestorOrSelf(); if (declaration.IsKind(SyntaxKind.FieldDeclaration) || declaration.IsKind(SyntaxKind.EventFieldDeclaration)) { - // We can't fix initalizations without introducing or prepending to a static constructor + // We can't fix initializations without introducing or prepending to a static constructor // for what is an unlikely scenario. continue; } diff --git a/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs b/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs index d1df416805f..16de84c640d 100644 --- a/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs +++ b/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs @@ -236,7 +236,7 @@ namespace System.Runtime.CompilerServices.Tests Type canonType = typeof(object).Assembly.GetType("System.__Canon", throwOnError: false); if (canonType != null) { - yield return new[] { typeof(List<>).MakeGenericType(canonType), typeof(NotSupportedException) }; // shared by generic instantiations + yield return new[] { typeof(List<>).MakeGenericType(canonType), typeof(NotSupportedException) }; // shared by generic instantiations } Type comObjType = typeof(object).Assembly.GetType("System.__ComObject", throwOnError: false); @@ -285,7 +285,7 @@ namespace System.Runtime.CompilerServices.Tests [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))] [Fact] - public static void GetUninitalizedObject_DoesNotRunBeforeFieldInitCctors() + public static void GetUninitializedObject_DoesNotRunBeforeFieldInitCctors() { object o = RuntimeHelpers.GetUninitializedObject(typeof(ClassWithBeforeFieldInitCctor)); Assert.IsType(o); @@ -294,7 +294,7 @@ namespace System.Runtime.CompilerServices.Tests } [Fact] - public static void GetUninitalizedObject_RunsNormalStaticCtors() + public static void GetUninitializedObject_RunsNormalStaticCtors() { object o = RuntimeHelpers.GetUninitializedObject(typeof(ClassWithNormalCctor)); Assert.IsType(o); diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/TimeoutTests.cs b/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/TimeoutTests.cs index e782a0c3e50..21b43baac0e 100644 --- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/TimeoutTests.cs +++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/TimeoutTests.cs @@ -62,7 +62,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests.RevocationTests // We expect the chain to build in at least 16 seconds (2 * delay) since each fetch // should take `delay` number of seconds, and there are two fetchs that need to be // performed. We allow a small amount of leeway to account for differences between - // how long the the delay is performed and the stopwatch. + // how long the delay is performed and the stopwatch. Assert.True(watch.Elapsed >= delay * 2 - TimeSpan.FromSeconds(1), $"watch.Elapsed: {watch.Elapsed}"); } }); diff --git a/src/libraries/System.Security.Cryptography/src/Resources/Strings.resx b/src/libraries/System.Security.Cryptography/src/Resources/Strings.resx index d24791008c2..c452e57f8db 100644 --- a/src/libraries/System.Security.Cryptography/src/Resources/Strings.resx +++ b/src/libraries/System.Security.Cryptography/src/Resources/Strings.resx @@ -433,10 +433,10 @@ The key is too small for the requested operation. - The specified plaintext size is not valid for the the padding and block size. + The specified plaintext size is not valid for the padding and block size. - The specified plaintext size is not valid for the the padding and feedback size. + The specified plaintext size is not valid for the padding and feedback size. The message exceeds the maximum allowable length for the chosen options ({0}). diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/PemEncoding.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/PemEncoding.cs index a253083a7fa..c6a55232bc0 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/PemEncoding.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/PemEncoding.cs @@ -212,7 +212,7 @@ namespace System.Security.Cryptography // is invalid. // If it is a space or hyphen, and the previous character was // also not a labelchar (another hyphen or space), then we have - // two consecutive spaces or hyphens which is is invalid. + // two consecutive spaces or hyphens which is invalid. if (!isSpaceOrHyphen || !previousIsLabelChar) { return false; diff --git a/src/libraries/System.Speech/src/Recognition/RecognizerBase.cs b/src/libraries/System.Speech/src/Recognition/RecognizerBase.cs index be7453e4466..77b492b52d3 100644 --- a/src/libraries/System.Speech/src/Recognition/RecognizerBase.cs +++ b/src/libraries/System.Speech/src/Recognition/RecognizerBase.cs @@ -2813,8 +2813,8 @@ ISpGrammarResourceLoader /// private void FireSignalProblemOccurredEvent(AudioSignalProblem audioSignalProblem) { - EventHandler audioSignalProblemOccuredHandler = _audioSignalProblemOccurredDelegate; - if (audioSignalProblemOccuredHandler != null) + EventHandler audioSignalProblemOccurredHandler = _audioSignalProblemOccurredDelegate; + if (audioSignalProblemOccurredHandler != null) { TimeSpan recognizerPosition = TimeSpan.Zero; TimeSpan audioPosition = TimeSpan.Zero; @@ -2837,7 +2837,7 @@ ISpGrammarResourceLoader throw ExceptionFromSapiCreateRecognizerError(e); } - _asyncWorkerUI.PostOperation(audioSignalProblemOccuredHandler, this, new AudioSignalProblemOccurredEventArgs(audioSignalProblem, AudioLevel, audioPosition, recognizerPosition)); + _asyncWorkerUI.PostOperation(audioSignalProblemOccurredHandler, this, new AudioSignalProblemOccurredEventArgs(audioSignalProblem, AudioLevel, audioPosition, recognizerPosition)); } } diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs index b8939dc46d7..7710b002054 100644 --- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs +++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs @@ -856,7 +856,7 @@ private static {JsonParameterInfoValuesTypeRef}[] {typeGenerationSpec.TypeInfoPr { string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeRef); - return GenerateFastPathFuncForType(typeGenSpec, + return GenerateFastPathFuncForType(typeGenSpec, $@"throw new {InvalidOperationExceptionTypeRef}(""{exceptionMessage}"");", emitNullCheck: false); // Skip null check since we want to throw an exception straightaway. } @@ -1261,7 +1261,7 @@ private {JsonConverterTypeRef} {GetConverterFromFactoryMethodName}({TypeTypeRef} {{ throw new {InvalidOperationExceptionTypeRef}(string.Format(""{ExceptionMessages.InvalidJsonConverterFactoryOutput}"", factory.GetType())); }} - + return converter; }}"; } @@ -1299,7 +1299,7 @@ private {JsonConverterTypeRef} {GetConverterFromFactoryMethodName}({TypeTypeRef} private string GetPropertyNameInitialization() { - // Ensure metadata for types has already occured. + // Ensure metadata for types has already occurred. Debug.Assert(!( _currentContext.TypesWithMetadataGenerated.Count == 0 && _currentContext.RuntimePropertyNames.Count > 0)); diff --git a/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs b/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs index a575b6d1a37..3197f134255 100644 --- a/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs +++ b/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs @@ -1087,7 +1087,7 @@ namespace System.Text.RegularExpressions.Generator // doneLabel starts out as the top-level label for the whole expression failing to match. However, // it may be changed by the processing of a node to point to whereever subsequent match failures // should jump to, in support of backtracking or other constructs. For example, before emitting - // the code for a branch N, an alternation will set the the doneLabel to point to the label for + // the code for a branch N, an alternation will set the doneLabel to point to the label for // processing the next branch N+1: that way, any failures in the branch N's processing will // implicitly end up jumping to the right location without needing to know in what context it's used. string doneLabel = ReserveName("NoMatch"); @@ -3615,7 +3615,7 @@ namespace System.Text.RegularExpressions.Generator writer.Write($".Slice({sliceStaticPos})"); } writer.WriteLine($".IndexOf({Literal(node.Ch)});"); - + using (EmitBlock(writer, $"if ({iterationLocal} < 0)")) { writer.WriteLine(sliceStaticPos > 0 ? diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.Match.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.Match.cs index 76f8ee6eaf5..96f57acfc59 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.Match.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.Match.cs @@ -85,7 +85,7 @@ namespace System.Text.RegularExpressions /// /// The span to search for a match. /// if the regular expression finds a match; otherwise, . - /// A time-out ocurred. + /// A time-out occurred. public bool IsMatch(ReadOnlySpan input) => RunSingleMatch(RegexRunnerMode.ExistenceRequired, -1, input, RightToLeft ? input.Length : 0).Success; diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs index c885a0a1591..322c371de15 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs @@ -5034,7 +5034,7 @@ namespace System.Text.RegularExpressions Ret(); } - /// Emits a a check for whether the character is in the specified character class. + /// Emits a check for whether the character is in the specified character class. /// The character to be checked has already been loaded onto the stack. private void EmitMatchCharacterClass(string charClass) { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/Configuration/AppSettings.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/Configuration/AppSettings.cs index fe50aad7087..9b46bd49a94 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/Configuration/AppSettings.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/Configuration/AppSettings.cs @@ -5,23 +5,23 @@ namespace System.Transactions.Configuration { internal static class AppSettings { - private static volatile bool s_settingsInitalized; + private static volatile bool s_settingsInitialized; private static readonly object s_appSettingsLock = new object(); private static bool s_includeDistributedTxIdInExceptionMessage; private static void EnsureSettingsLoaded() { - if (!s_settingsInitalized) + if (!s_settingsInitialized) { lock (s_appSettingsLock) { - if (!s_settingsInitalized) + if (!s_settingsInitialized) { // TODO: Determine how to handle configuration. // This uses System.Configuration on .NET Framework to load: // Transactions:IncludeDistributedTransactionIdInExceptionMessage s_includeDistributedTxIdInExceptionMessage = false; - s_settingsInitalized = true; + s_settingsInitialized = true; } } } diff --git a/src/mono/mono/component/hot_reload.c b/src/mono/mono/component/hot_reload.c index b8bf4632269..4935c588a62 100644 --- a/src/mono/mono/component/hot_reload.c +++ b/src/mono/mono/component/hot_reload.c @@ -1902,7 +1902,7 @@ add_nested_class_to_worklist (Pass2Context *ctx, MonoImage *image_base, uint32_t /** * For any enclosing classes that already had their nested classes property initialized, - * add any newly-added classes the the nested classes list. + * add any newly-added classes the nested classes list. * * This has to be called late because we construct the nested class - which * could have been a skeleton. @@ -1922,7 +1922,7 @@ pass2_update_nested_classes (Pass2Context *ctx, MonoImage *image_base, MonoError uint32_t enclosing_typedef_row = cols[MONO_NESTED_CLASS_ENCLOSING]; if (pass2_context_is_skeleton (ctx, enclosing_typedef_row)) continue; - + MonoClass *enclosing_klass = mono_class_get_checked (image_base, mono_metadata_make_token (MONO_TABLE_TYPEDEF, enclosing_typedef_row), error); return_val_if_nok (error, FALSE); g_assert (enclosing_klass); @@ -2140,7 +2140,7 @@ apply_enclog_pass2 (Pass2Context *ctx, MonoImage *image_base, BaselineInfo *base mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_METADATA_UPDATE, "Can't get class with token 0x%08x due to: %s", add_member_typedef, mono_error_get_message (error)); return FALSE; } - + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_METADATA_UPDATE, "Adding new field 0x%08x to class %s.%s", log_token, m_class_get_name_space (add_member_klass), m_class_get_name (add_member_klass)); uint32_t mapped_token = hot_reload_relative_delta_index (image_dmeta, delta_info, log_token); @@ -2167,7 +2167,7 @@ apply_enclog_pass2 (Pass2Context *ctx, MonoImage *image_base, BaselineInfo *base return FALSE; } } - + add_member_typedef = 0; break; } @@ -2276,7 +2276,7 @@ apply_enclog_pass2 (Pass2Context *ctx, MonoImage *image_base, BaselineInfo *base mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_METADATA_UPDATE, "EnC: eventmap parent = 0x%08x, evts = 0x%08x\n", prop_cols [MONO_EVENT_MAP_PARENT], prop_cols [MONO_EVENT_MAP_EVENTLIST]); break; - + } case MONO_TABLE_EVENT: { if (!is_addition) @@ -3075,7 +3075,7 @@ hot_reload_added_fields_iter (MonoClass *klass, gboolean lazy G_GNUC_UNUSED, gpo g_assert (idx >= mono_class_get_field_count (klass)); uint32_t field_idx = idx - mono_class_get_field_count (klass); - + mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_METADATA_UPDATE, "Iterating added fields of 0x%08x idx = %u", m_class_get_type_token (klass), field_idx); GSList *field_node = g_slist_nth (added_fields, field_idx); diff --git a/src/mono/mono/metadata/class-init.c b/src/mono/mono/metadata/class-init.c index 2da309c2f23..d22bab650ed 100644 --- a/src/mono/mono/metadata/class-init.c +++ b/src/mono/mono/metadata/class-init.c @@ -1342,7 +1342,7 @@ make_generic_param_class (MonoGenericParam *param) klass->has_references = m_class_has_references (constraint_class); } /* - * This makes sure the the value size of this class is equal to the size of the types the gparam is + * This makes sure the value size of this class is equal to the size of the types the gparam is * constrained to, the JIT depends on this. */ klass->instance_size = MONO_ABI_SIZEOF (MonoObject) + mono_type_size (m_class_get_byval_arg (klass), &min_align); diff --git a/src/mono/mono/metadata/class-setup-vtable.c b/src/mono/mono/metadata/class-setup-vtable.c index 7d36cbd0b79..009110f546d 100644 --- a/src/mono/mono/metadata/class-setup-vtable.c +++ b/src/mono/mono/metadata/class-setup-vtable.c @@ -1484,7 +1484,7 @@ is_ok_for_covariant_ret (MonoType *type_impl, MonoType *type_decl) * } * class A : B { * public virtual newslot C Foo () { - * .override C C::Foo (); // type load error - it should be a a subclass of B because of B's override of C::Foo + * .override C C::Foo (); // type load error - it should be a subclass of B because of B's override of C::Foo * } * } */ diff --git a/src/mono/mono/metadata/icall.c b/src/mono/mono/metadata/icall.c index 197aa105122..13cbde1a771 100644 --- a/src/mono/mono/metadata/icall.c +++ b/src/mono/mono/metadata/icall.c @@ -4390,7 +4390,7 @@ ves_icall_System_Reflection_Assembly_InternalGetType (MonoReflectionAssemblyHand /* need to report exceptions ? */ if (throwOnError && mono_class_has_failure (klass)) { - /* report SecurityException (or others) that occured when loading the assembly */ + /* report SecurityException (or others) that occurred when loading the assembly */ mono_error_set_for_class_failure (error, klass); goto fail; } diff --git a/src/mono/mono/metadata/marshal.c b/src/mono/mono/metadata/marshal.c index 7659e943a50..5f59ef95e22 100644 --- a/src/mono/mono/metadata/marshal.c +++ b/src/mono/mono/metadata/marshal.c @@ -1666,7 +1666,7 @@ get_wrapper_target_class (MonoImage *image) * - can't put all wrappers into an mscorlib class, because they reference * metadata (signature) so they should be put into the same image as the * method they wrap, so they are unloaded together. - * - putting them into a class with a type initalizer could cause the + * - putting them into a class with a type initializer could cause the * initializer to be executed which can be a problem if the wrappers are * shared. * - putting them into an inflated class can cause problems if the the diff --git a/src/mono/mono/metadata/object.c b/src/mono/mono/metadata/object.c index dcd2aa4fcea..d705937a17d 100644 --- a/src/mono/mono/metadata/object.c +++ b/src/mono/mono/metadata/object.c @@ -1602,7 +1602,7 @@ build_imt_slots (MonoClass *klass, MonoVTable *vt, gpointer* imt, GSList *extra_ if (has_generic_virtual || has_variant_iface) { /* - * There might be collisions later when the the trampoline is expanded. + * There might be collisions later when the trampoline is expanded. */ imt_collisions_bitmap |= (1 << i); diff --git a/src/mono/mono/mini/abcremoval.c b/src/mono/mono/mini/abcremoval.c index a4326428fd0..352261e75cb 100644 --- a/src/mono/mono/mini/abcremoval.c +++ b/src/mono/mono/mini/abcremoval.c @@ -737,7 +737,7 @@ evaluate_relation_with_target_variable (MonoVariableRelationsEvaluationArea *are printf ("\n"); } - // We decie what to do according the the type of the related value + // We decie what to do according the type of the related value switch (relation->related_value.type) { case MONO_ANY_SUMMARIZED_VALUE: // No added information, skip it diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c index 21a53179873..56df9afc285 100644 --- a/src/mono/mono/mini/aot-compiler.c +++ b/src/mono/mono/mini/aot-compiler.c @@ -5060,7 +5060,7 @@ add_wrappers (MonoAotCompile *acfg) rows = table_info_get_rows (&acfg->image->tables [MONO_TABLE_METHOD]); for (int i = 0; i < rows; ++i) { ERROR_DECL (error); - + MonoCustomAttrInfo *cattr; int j; @@ -11807,7 +11807,7 @@ emit_file_info (MonoAotCompile *acfg) /* * Emit a global symbol which can be passed by an embedding app to - * mono_aot_register_module (). The symbol points to a pointer to the the file info + * mono_aot_register_module (). The symbol points to a pointer to the file info * structure. */ sprintf (symbol, "%smono_aot_module_%s_info", acfg->user_symbol_prefix, acfg->image->assembly->aname.name); diff --git a/src/mono/mono/mini/aot-runtime.c b/src/mono/mono/mini/aot-runtime.c index 8644f519a07..c8a375bb1f7 100644 --- a/src/mono/mono/mini/aot-runtime.c +++ b/src/mono/mono/mini/aot-runtime.c @@ -5371,7 +5371,7 @@ load_function_full (MonoAotModule *amodule, const char *name, MonoTrampInfo **ou continue; /* - * When this code is executed, the runtime may not be initalized yet, so + * When this code is executed, the runtime may not be initialized yet, so * resolve the patch info by hand. */ if (ji->type == MONO_PATCH_INFO_SPECIFIC_TRAMPOLINE_LAZY_FETCH_ADDR) { diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index 046aa948e91..d1766217cf6 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -4725,7 +4725,7 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header, goto exit; if (need_seq_point) { - //check is is a nested call and remove the MONO_INST_NONEMPTY_STACK of the last breakpoint, only for non native methods + // check if it is a nested call and remove the MONO_INST_NONEMPTY_STACK of the last breakpoint, only for non native methods if (!(method->flags & METHOD_IMPL_ATTRIBUTE_NATIVE)) { if (emitted_funccall_seq_point) { if (last_seq_point) diff --git a/src/mono/mono/mini/method-to-ir.c b/src/mono/mono/mini/method-to-ir.c index a04597374e0..3aa7e6b3579 100644 --- a/src/mono/mono/mini/method-to-ir.c +++ b/src/mono/mono/mini/method-to-ir.c @@ -8289,7 +8289,7 @@ calli_end: constrained_class = NULL; if (need_seq_point) { - //check is is a nested call and remove the non_empty_stack of the last call, only for non native methods + // check if it is a nested call and remove the non_empty_stack of the last call, only for non native methods if (!(method->flags & METHOD_IMPL_ATTRIBUTE_NATIVE)) { if (emitted_funccall_seq_point) { if (cfg->last_seq_point) @@ -10030,7 +10030,7 @@ calli_end: } else { gboolean is_const = FALSE; MonoVTable *vtable = NULL; - + addr = NULL; if (!context_used) { vtable = mono_class_vtable_checked (klass, cfg->error); diff --git a/src/mono/mono/mini/mini-arm64.c b/src/mono/mono/mini/mini-arm64.c index 75a6d5b3adb..4d2125c8224 100644 --- a/src/mono/mono/mini/mini-arm64.c +++ b/src/mono/mono/mini/mini-arm64.c @@ -2271,7 +2271,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) offset += 16; break; case ArgVtypeByRef: - /* This variable will be initalized in the prolog from R8 */ + /* This variable will be initialized in the prolog from R8 */ cfg->vret_addr->opcode = OP_REGOFFSET; cfg->vret_addr->inst_basereg = cfg->frame_reg; cfg->vret_addr->inst_offset = offset; diff --git a/src/mono/mono/mini/mini-gc.c b/src/mono/mono/mini/mini-gc.c index 9c1477bb68a..eaa3a101b18 100644 --- a/src/mono/mono/mini/mini-gc.c +++ b/src/mono/mono/mini/mini-gc.c @@ -170,7 +170,7 @@ typedef struct { int start_offset; int end_offset; /* - * The offset relative to frame_offset where the the memory described by the GC maps + * The offset relative to frame_offset where the memory described by the GC maps * begins. */ int map_offset; diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c index 6f02c54a68b..a64a02e72e2 100644 --- a/src/mono/mono/mini/mini-llvm.c +++ b/src/mono/mono/mini/mini-llvm.c @@ -9048,7 +9048,7 @@ MONO_RESTORE_WARNING break; case OP_SSE2_PSHUFD: /* - * Each 2 bits in mask selects 1 dword from the the source and copies it to the + * Each 2 bits in mask selects 1 dword from the source and copies it to the * destination. */ mask_len = 4; diff --git a/src/mono/mono/mini/mini-ops.h b/src/mono/mono/mini/mini-ops.h index 03034b4b38c..da197b492ee 100644 --- a/src/mono/mono/mini/mini-ops.h +++ b/src/mono/mono/mini/mini-ops.h @@ -93,7 +93,7 @@ MINI_OP(OP_RETHROW, "rethrow", NONE, IREG, NONE) /* * Vararg calls are implemented as follows: * - the caller emits a hidden argument just before the varargs argument. this - * 'signature cookie' argument contains the signature describing the the call. + * 'signature cookie' argument contains the signature describing the call. * - all implicit arguments are passed in memory right after the signature cookie, i.e. * the stack will look like this: * diff --git a/src/mono/mono/mini/mini-posix.c b/src/mono/mono/mini/mini-posix.c index 65e7aa985f4..be8f83d3968 100644 --- a/src/mono/mono/mini/mini-posix.c +++ b/src/mono/mono/mini/mini-posix.c @@ -785,7 +785,7 @@ dump_native_stacktrace (const char *signal, MonoContext *mctx) if (!double_faulted) { g_assertion_disable_global (assert_printer_callback); } else { - g_async_safe_printf ("\nAn error has occured in the native fault reporting. Some diagnostic information will be unavailable.\n"); + g_async_safe_printf ("\nAn error has occurred in the native fault reporting. Some diagnostic information will be unavailable.\n"); } diff --git a/src/mono/mono/mini/mini-x86.h b/src/mono/mono/mini/mini-x86.h index 732db5f4f4f..30f8ea3ecb3 100644 --- a/src/mono/mono/mini/mini-x86.h +++ b/src/mono/mono/mini/mini-x86.h @@ -114,12 +114,12 @@ LONG CALLBACK seh_handler(EXCEPTION_POINTERS* ep); * reproduceable results for benchmarks */ #define MONO_ARCH_CODE_ALIGNMENT 32 -/*This is the max size of the locals area of a given frame. I think 1MB is a safe default for now*/ +/* This is the max size of the locals area of a given frame. I think 1MB is a safe default for now */ #define MONO_ARCH_MAX_FRAME_SIZE 0x100000 -/*This is how much a try block must be extended when is is preceeded by a Monitor.Enter() call. +/* This is how much a try block must be extended when it is preceeded by a Monitor.Enter() call. It's 4 bytes as this is how many bytes + 1 that 'add 0x10, %esp' takes. It is used to pop the arguments from -the monitor.enter call and must be already protected.*/ +the monitor.enter call and must be already protected. */ #define MONO_ARCH_MONITOR_ENTER_ADJUSTMENT 4 struct MonoLMF { diff --git a/src/mono/mono/sgen/sgen-conf.h b/src/mono/mono/sgen/sgen-conf.h index 9962dffb34c..243c3173cd1 100644 --- a/src/mono/mono/sgen/sgen-conf.h +++ b/src/mono/mono/sgen/sgen-conf.h @@ -209,7 +209,7 @@ typedef target_mword SgenDescriptor; #define SGEN_DEFAULT_ALLOWANCE_HEAP_SIZE_RATIO 0.33 /* - * Default ratio of memory we want to release in a major collection in relation to the the current heap size. + * Default ratio of memory we want to release in a major collection in relation to the current heap size. * * A major collection target is to free a given amount of memory. This amount is a ratio of the major heap size. * diff --git a/src/mono/mono/tests/bug-60862.cs b/src/mono/mono/tests/bug-60862.cs index 251838f584d..17fd73437fd 100644 --- a/src/mono/mono/tests/bug-60862.cs +++ b/src/mono/mono/tests/bug-60862.cs @@ -16,11 +16,11 @@ namespace StackOverflowTest t.Join (); if (fault) { if (ex == null) { - Console.WriteLine ("fault occured, but no exception object available"); + Console.WriteLine ("fault occurred, but no exception object available"); return 1; } else { bool is_stackoverlfow = ex is StackOverflowException; - Console.WriteLine ("fault occured: ex = " + is_stackoverlfow); + Console.WriteLine ("fault occurred: ex = " + is_stackoverlfow); return is_stackoverlfow ? 0 : 3; } } diff --git a/src/mono/mono/tests/verifier/make_tests.sh b/src/mono/mono/tests/verifier/make_tests.sh index b614b5dbf9a..45866b274af 100755 --- a/src/mono/mono/tests/verifier/make_tests.sh +++ b/src/mono/mono/tests/verifier/make_tests.sh @@ -4143,7 +4143,7 @@ done ./make_delegate_compat_test.sh delegate_method_ptr_arg_1 unverifiable int32 int32 "method int32 *(float64)" "method int32 *(float64)" #no way do say this is invalid ./make_delegate_compat_test.sh delegate_method_ptr_arg_2 unverifiable int32 int32 "method int32 *(float64)" "method int32 *(int32)" -#and that is is valid +#and that it is valid ./make_delegate_compat_test.sh delegate_method_ptr_arg_2 unverifiable int32 int32 "method int32 *(string)" "method int32 *(object)" @@ -4214,7 +4214,7 @@ done ./make_delegate_compat_test.sh delegate_method_ptr_arg_1 unverifiable "method int32 *(float64)" "method int32 *(float64)" int32 int32 #no way do say this is invalid ./make_delegate_compat_test.sh delegate_method_ptr_arg_2 unverifiable "method int32 *(float64)" "method int32 *(int32)" int32 int32 -#and that is is valid +#and that it is valid ./make_delegate_compat_test.sh delegate_method_ptr_arg_2 unverifiable "method int32 *(object)" "method int32 *(string)" int32 int32 #TODO: 7,8,9 generic related. diff --git a/src/mono/mono/utils/dlmalloc.c b/src/mono/mono/utils/dlmalloc.c index 48ed19153e7..5ec4f6b2926 100644 --- a/src/mono/mono/utils/dlmalloc.c +++ b/src/mono/mono/utils/dlmalloc.c @@ -1583,7 +1583,7 @@ static MLOCK_T magic_init_mutex; Each freshly allocated chunk must have both cinuse and pinuse set. That is, each allocated chunk borders either a previously allocated and still in-use chunk, or the base of its memory arena. This is - ensured by making all allocations from the the `lowest' part of any + ensured by making all allocations from the `lowest' part of any found chunk. Further, no free chunk physically borders another one, so each free chunk is known to be preceded and followed by either inuse chunks or the ends of memory. @@ -1794,7 +1794,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ work in the same way as fd/bk pointers of small chunks. Each tree contains a power of 2 sized range of chunk sizes (the - smallest is 0x100 <= x < 0x180), which is is divided in half at each + smallest is 0x100 <= x < 0x180), which is divided in half at each tree level, with the chunks in the smaller half of the range (0x100 <= x < 0x140 for the top nose) in the left subtree and the larger half (0x140 <= x < 0x180) in the right subtree. This is, of course, @@ -5040,7 +5040,7 @@ History: * Use ordered bins instead of best-fit threshhold * Eliminate block-local decls to simplify tracing and debugging. * Support another case of realloc via move into top - * Fix error occuring when initial sbrk_base not word-aligned. + * Fix error occurring when initial sbrk_base not word-aligned. * Rely on page size for units instead of SBRK_UNIT to avoid surprises about sbrk alignment conventions. * Add mallinfo, mallopt. Thanks to Raymond Nijssen diff --git a/src/mono/mono/utils/mono-log-flight-recorder.c b/src/mono/mono/utils/mono-log-flight-recorder.c index c083391038f..ceb2f78c987 100644 --- a/src/mono/mono/utils/mono-log-flight-recorder.c +++ b/src/mono/mono/utils/mono-log-flight-recorder.c @@ -131,7 +131,7 @@ mono_log_write_recorder (const char *log_domain, GLogLevelFlags level, mono_bool #endif return; } else if (level & G_LOG_LEVEL_ERROR) { - fprintf (stderr, "\nFatal Error Occured: %s\n\nHistory:\n", message); + fprintf (stderr, "\nFatal Error Occurred: %s\n\nHistory:\n", message); mono_log_dump_recorder (); abort(); } else if (!logger_thread->run_thread) { diff --git a/src/mono/mono/utils/mono-threads-mach-helper.c b/src/mono/mono/utils/mono-threads-mach-helper.c index 498d9ff069d..0efe506faf5 100644 --- a/src/mono/mono/utils/mono-threads-mach-helper.c +++ b/src/mono/mono/utils/mono-threads-mach-helper.c @@ -34,7 +34,7 @@ static id mono_dead_letter_key; /* * Our Mach bindings have a problem in that they might need to attach - * the runtime after the the user tls keys have been destroyed. + * the runtime after the user tls keys have been destroyed. * * This happens when a bound object is retained by NSThread, which is * released very late in the TLS cleanup process. diff --git a/src/mono/mono/utils/mono-threads-state-machine.c b/src/mono/mono/utils/mono-threads-state-machine.c index 8b863f83713..c335fedc625 100644 --- a/src/mono/mono/utils/mono-threads-state-machine.c +++ b/src/mono/mono/utils/mono-threads-state-machine.c @@ -319,7 +319,7 @@ retry_state_change: /* [1] It's questionable on what to do if we hit the beginning of a self suspend. -The expected behavior is that the target should poll its state very soon so the the suspend latency should be minimal. +The expected behavior is that the target should poll its state very soon so the suspend latency should be minimal. STATE_ASYNC_SUSPEND_REQUESTED: Since there can only be one async suspend in progress and it must finish, it should not be possible to witness this. */ diff --git a/src/native/corehost/fxr/fx_resolver.cpp b/src/native/corehost/fxr/fx_resolver.cpp index 24fdc1efe26..14a40012c78 100644 --- a/src/native/corehost/fxr/fx_resolver.cpp +++ b/src/native/corehost/fxr/fx_resolver.cpp @@ -438,7 +438,7 @@ StatusCode fx_resolver_t::read_framework( m_effective_fx_references[fx_name] = new_effective_fx_ref; - // Resolve the effective framework reference against the the existing physical framework folders + // Resolve the effective framework reference against the existing physical framework folders fx_definition_t* fx = resolve_framework_reference(new_effective_fx_ref, m_oldest_fx_references[fx_name].get_fx_version(), host_info.dotnet_root, disable_multilevel_lookup); if (fx == nullptr) { diff --git a/src/native/corehost/fxr/hostfxr.cpp b/src/native/corehost/fxr/hostfxr.cpp index 28a12e2d326..a45b95e8656 100644 --- a/src/native/corehost/fxr/hostfxr.cpp +++ b/src/native/corehost/fxr/hostfxr.cpp @@ -32,7 +32,7 @@ SHARED_API int HOSTFXR_CALLTYPE hostfxr_main_bundle_startupinfo(const int argc, StatusCode bundleStatus = bundle::info_t::process_bundle(host_path, app_path, bundle_header_offset); if (bundleStatus != StatusCode::Success) { - trace::error(_X("A fatal error occured while processing application bundle")); + trace::error(_X("A fatal error occurred while processing application bundle")); return bundleStatus; } @@ -106,7 +106,7 @@ SHARED_API int HOSTFXR_CALLTYPE hostfxr_main(const int argc, const pal::char_t* // required to store the located SDK. // // If resolution succeeds and the positive return value is less than -// or equal to buffer_size (i.e. the the buffer is large enough), +// or equal to buffer_size (i.e. the buffer is large enough), // then the resolved SDK path is copied to the buffer and null // terminated. Otherwise, no data is written to the buffer. // diff --git a/src/native/corehost/hostfxr.h b/src/native/corehost/hostfxr.h index 49afae3dba2..d25b02ab6b6 100644 --- a/src/native/corehost/hostfxr.h +++ b/src/native/corehost/hostfxr.h @@ -64,7 +64,7 @@ typedef void(HOSTFXR_CALLTYPE *hostfxr_error_writer_fn)(const char_t *message); // By default no callback is registered in which case the errors are written to stderr. // // Each call to the error writer is sort of like writing a single line (the EOL character is omitted). -// Multiple calls to the error writer may occure for one failure. +// Multiple calls to the error writer may occur for one failure. // // If the hostfxr invokes functions in hostpolicy as part of its operation, the error writer // will be propagated to hostpolicy for the duration of the call. This means that errors from diff --git a/src/native/corehost/hostpolicy/hostpolicy.cpp b/src/native/corehost/hostpolicy/hostpolicy.cpp index 635fb26095c..9e74ab13f1e 100644 --- a/src/native/corehost/hostpolicy/hostpolicy.cpp +++ b/src/native/corehost/hostpolicy/hostpolicy.cpp @@ -298,7 +298,7 @@ void trace_hostpolicy_entrypoint_invocation(const pal::string_t& entryPointName) // // Loads and initilizes the hostpolicy. // -// If hostpolicy is already initalized, the library will not be +// If hostpolicy is already initialized, the library will not be // reinitialized. // SHARED_API int HOSTPOLICY_CALLTYPE corehost_load(host_interface_t* init) @@ -961,7 +961,7 @@ SHARED_API int HOSTPOLICY_CALLTYPE corehost_resolve_component_dependencies( // By default no callback is registered in which case the errors are written to stderr. // // Each call to the error writer is sort of like writing a single line (the EOL character is omitted). -// Multiple calls to the error writer may occure for one failure. +// Multiple calls to the error writer may occur for one failure. // SHARED_API corehost_error_writer_fn HOSTPOLICY_CALLTYPE corehost_set_error_writer(corehost_error_writer_fn error_writer) { diff --git a/src/native/corehost/hostpolicy/hostpolicy_context.cpp b/src/native/corehost/hostpolicy/hostpolicy_context.cpp index f44b668f608..8d6488341b1 100644 --- a/src/native/corehost/hostpolicy/hostpolicy_context.cpp +++ b/src/native/corehost/hostpolicy/hostpolicy_context.cpp @@ -15,7 +15,7 @@ namespace void log_duplicate_property_error(const pal::char_t *property_key) { trace::error(_X("Duplicate runtime property found: %s"), property_key); - trace::error(_X("It is invalid to specify values for properties populated by the hosting layer in the the application's .runtimeconfig.json")); + trace::error(_X("It is invalid to specify values for properties populated by the hosting layer in the application's .runtimeconfig.json")); } // bundle_probe: @@ -180,7 +180,7 @@ int hostpolicy_context_t::initialize(hostpolicy_init_t &hostpolicy_init, const a // If this is a self-contained single-file bundle, // System.Private.CoreLib.dll is expected to be within the bundle, unless it is explicitly excluded from the bundle. - // In all other cases, + // In all other cases, // System.Private.CoreLib.dll is expected to be next to CoreCLR.dll - add its path to the TPA list. if (!bundle::info_t::is_single_file_bundle() || bundle::runner_t::app()->probe(CORELIB_NAME) == nullptr) @@ -289,7 +289,7 @@ int hostpolicy_context_t::initialize(hostpolicy_init_t &hostpolicy_init, const a startup_hooks.push_back(PATH_SEPARATOR); startup_hooks.append(config_startup_hooks); } - + coreclr_properties.add(common_property::StartUpHooks, startup_hooks.c_str()); } diff --git a/src/native/eventpipe/ep-thread.h b/src/native/eventpipe/ep-thread.h index 0480a2d13aa..30b91883a64 100644 --- a/src/native/eventpipe/ep-thread.h +++ b/src/native/eventpipe/ep-thread.h @@ -287,7 +287,7 @@ struct _EventPipeThreadSessionState_Internal { // by the thread capturing the sequence point. The only utility this // unsychronized read has is that if some other thread observes a sequence // number X, it knows this thread must have attempted to write at least - // X events prior to the moment in time when the read occured. If the event + // X events prior to the moment in time when the read occurred. If the event // buffers are later read and there are fewer than X events timestamped // prior to the sequence point we can be certain the others were dropped. volatile uint32_t sequence_number; diff --git a/src/native/eventpipe/ep.c b/src/native/eventpipe/ep.c index 587a59defef..19925c0b9ba 100644 --- a/src/native/eventpipe/ep.c +++ b/src/native/eventpipe/ep.c @@ -762,7 +762,7 @@ write_event_2 ( ep_thread_set_session_write_in_progress (current_thread, i); { EventPipeSession *const session = ep_volatile_load_session (i); - // Disable is allowed to set s_pSessions[i] = NULL at any time and that may have occured in between + // Disable is allowed to set s_pSessions[i] = NULL at any time and that may have occurred in between // the check and the load if (session != NULL) { ep_session_write_event ( diff --git a/src/native/libs/System.Globalization.Native/pal_icushim_internal.h b/src/native/libs/System.Globalization.Native/pal_icushim_internal.h index 47e30e50fda..f01ef2384c3 100644 --- a/src/native/libs/System.Globalization.Native/pal_icushim_internal.h +++ b/src/native/libs/System.Globalization.Native/pal_icushim_internal.h @@ -68,8 +68,8 @@ U_CAPI int32_t U_EXPORT2 ucal_getWindowsTimeZoneID(const UChar* id, int32_t len, U_CAPI UCollator* U_EXPORT2 ucol_clone(const UCollator* coll, UErrorCode* status); // ucol_setVariableTop is a deprecated function on the newer ICU versions and ucol_setMaxVariable should be used instead. -// As can run against ICU versions which not supported ucol_setMaxVariable, we'll dynamically try to get the pointer to ucol_setVariableTop -// when we couldn't get a pointer to ucol_setMaxVariable. +// As we can run against ICU versions which do not support ucol_setMaxVariable, we will dynamically try to get the pointer +// to ucol_setVariableTop when we could not get a pointer to ucol_setMaxVariable. typedef uint32_t (U_EXPORT2 *ucol_setVariableTop_func)(UCollator* coll, const UChar* varTop, int32_t len, UErrorCode* status); // ucol_safeClone is deprecated in ICU version 71. We have to handle it manually to avoid getting a build break when referencing it in the code. diff --git a/src/native/libs/System.IO.Compression.Native/pal_zlib.h b/src/native/libs/System.IO.Compression.Native/pal_zlib.h index 1eb1baa6b38..fc2f2107ee8 100644 --- a/src/native/libs/System.IO.Compression.Native/pal_zlib.h +++ b/src/native/libs/System.IO.Compression.Native/pal_zlib.h @@ -96,7 +96,7 @@ Returns a PAL_ErrorCode indicating success or an error number on failure. FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_Deflate(PAL_ZStream* stream, int32_t flush); /* -This function is equivalent to DeflateEnd followed by DeflateInit, but does not free and reallocate +This function is equivalent to DeflateEnd followed by DeflateInit, but does not free and reallocate the internal compression state. The stream will leave the compression level and any other attributes that may have been set unchanged. Returns a PAL_ErrorCode indicating success or an error number on failure. @@ -126,8 +126,8 @@ Returns a PAL_ErrorCode indicating success or an error number on failure. FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_Inflate(PAL_ZStream* stream, int32_t flush); /* -This function is equivalent to InflateEnd followed by InflateInit, but does not free and reallocate -the internal decompression state. The The stream will keep attributes that may have been set by InflateInit. +This function is equivalent to InflateEnd followed by InflateInit, but does not free and reallocate +the internal decompression state. The stream will keep attributes that may have been set by InflateInit. Returns a PAL_ErrorCode indicating success or an error number on failure. */ diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_hmac.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_hmac.c index 0dccef8d2c5..a367d567771 100644 --- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_hmac.c +++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_hmac.c @@ -40,7 +40,7 @@ jobject CryptoNative_HmacCreate(uint8_t* key, int32_t keyLen, intptr_t type) else { // Java does not support zero-length byte arrays in the SecretKeySpec type, - // so instead create an empty 1-byte length byte array that's initalized to 0. + // so instead create an empty 1-byte length byte array that's initialized to 0. // the HMAC algorithm pads keys with zeros until the key is block-length, // so this effectively creates the same key as if it were a zero byte-length key. keyBytes = make_java_byte_array(env, 1); diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.cs b/src/tasks/AotCompilerTask/MonoAOTCompiler.cs index 2def4e2478b..66cf3ec06e8 100644 --- a/src/tasks/AotCompilerTask/MonoAOTCompiler.cs +++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.cs @@ -439,7 +439,7 @@ public class MonoAOTCompiler : Microsoft.Build.Utilities.Task create an imbalance, like mentioned above, and we can end up in a situation where one of the partitions has a job that takes very long to execute, by which time other partitions - have completed, so some cores are idle. But the the idle + have completed, so some cores are idle. But the idle ones won't get any of the remaining jobs, because they are all assigned to that one partition. diff --git a/src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs b/src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs index e5d6f0f0de5..1f802965371 100644 --- a/src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs +++ b/src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs @@ -47,7 +47,7 @@ public class ILStrip : Microsoft.Build.Utilities.Task if (!result.IsCompleted && !Log.HasLoggedErrors) { - Log.LogError("Unknown failure occured while IL stripping assemblies. Check logs to get more details."); + Log.LogError("Unknown failure occurred while IL stripping assemblies. Check logs to get more details."); } return !Log.HasLoggedErrors; diff --git a/src/tasks/WasmAppBuilder/EmccCompile.cs b/src/tasks/WasmAppBuilder/EmccCompile.cs index 4ff6ab1a486..0011a50a831 100644 --- a/src/tasks/WasmAppBuilder/EmccCompile.cs +++ b/src/tasks/WasmAppBuilder/EmccCompile.cs @@ -149,7 +149,7 @@ namespace Microsoft.WebAssembly.Build.Tasks create an imbalance, like mentioned above, and we can end up in a situation where one of the partitions has a job that takes very long to execute, by which time other partitions - have completed, so some cores are idle. But the the idle + have completed, so some cores are idle. But the idle ones won't get any of the remaining jobs, because they are all assigned to that one partition. @@ -165,7 +165,7 @@ namespace Microsoft.WebAssembly.Build.Tasks }); if (!result.IsCompleted && !Log.HasLoggedErrors) - Log.LogError("Unknown failure occured while compiling. Check logs to get more details."); + Log.LogError("Unknown failure occurred while compiling. Check logs to get more details."); if (!Log.HasLoggedErrors) { diff --git a/src/tests/Common/scripts/migrate-tags.py b/src/tests/Common/scripts/migrate-tags.py index 6cf6985b598..d390a2608f0 100644 --- a/src/tests/Common/scripts/migrate-tags.py +++ b/src/tests/Common/scripts/migrate-tags.py @@ -33,7 +33,7 @@ def parse_list_file(listfile): # This function will build a list 'testdata' # that contains a 4-tuple for each test that we find - # + # testdata = [] test_name = None @@ -72,26 +72,26 @@ def parse_list_file(listfile): # we record the key and the value strings key = split_line[0] value = split_line[1] - + if key == 'Categories': # 'Categories' values are always split using ';' # first remove the trailing newline # now split using semicolon value = value.split(';') - + if key == 'RelativePath': - # The 'RelativePath' value is used in the tuple, - # so we record it's value here. + # The 'RelativePath' value is used in the tuple, + # so we record it's value here. if test_fullpath is not None: fatal('logic error - fullpath is already set'); test_fullpath = value - + tup = (key, value) - test_properties.append(tup) + test_properties.append(tup) else: # we didn't have a 'key=value' line # we will switch to expecting_testname - # note that we have already read the next line + # note that we have already read the next line # so need to fall into the code below which finds # the test name from the line that we just read @@ -100,7 +100,7 @@ def parse_list_file(listfile): # we must record the current test information: # create the four-tuple entry - entry = (test_name, test_number, + entry = (test_name, test_number, test_fullpath, test_properties) testdata.append(entry) @@ -114,14 +114,14 @@ def parse_list_file(listfile): # change the state to expecting_testname expecting_metadata = False expecting_testname = True - + if expecting_testname: # We are expecting the next testname entry # We will skip lines until we find a test name line # which comes in as [ testname_number ] split_line = line.split('[') - - # if we don't have a '[' the the len(split_line) will be 1 + + # if we don't have a '[' the len(split_line) will be 1 # we will skip (ignore) this line if len(split_line) == 1: continue @@ -136,33 +136,33 @@ def parse_list_file(listfile): # only when len(split_line) is 2 did we match exactly one '[' if len(split_line) != 2: fatal('syntax error - multiple ['); - + split_line = split_line[1].split(']') - + # only when len(split_line) is 2 did we match exactly one ']' if len(split_line) != 2: fatal('syntax error - missing or multiple ]:' + line); - + # get the string enclosed by [ ... ] name_and_number = split_line[0] - + split_line = name_and_number.split('_') - + # Note that the testname portion may also contain '_' so we # have to get the testnumber from the end using [-1] if len(split_line) == 1: fatal('syntax error - missing _' + line); - + # elements in split_line are numbered [ 0, 1, ... -2, -1 ] test_number_str = split_line[-1] - if len(split_line) == 2: - test_name = split_line[0] + if len(split_line) == 2: + test_name = split_line[0] else: - test_name = '_'.join(split_line[0:-1]) + test_name = '_'.join(split_line[0:-1]) if not test_number_str.isdigit(): fatal('syntax error - missing or illegal testnumber'+line); - + test_number = int(test_number_str) expecting_testname = False @@ -174,7 +174,7 @@ def parse_list_file(listfile): testdata.append(entry) print str(len(testdata)) + ' tests found in ' + listfile - print + print return testdata ################################################################################ @@ -211,7 +211,7 @@ def write_list_file(filename, testdata): value_str = values; # when key is 'Categories' the values is a list of strings - # so construct the value_str using join + # so construct the value_str using join if key == 'Categories': # 'Categories' values were split using ';' # so we need to use 'join' to reverse that @@ -270,12 +270,12 @@ def migrate_tags(new_data, old_data): if not 'NEW' in new_tags: new_tags.append('NEW') else: - # We have a matching old_entry, so we will build a + # We have a matching old_entry, so we will build a # concatenation of the 'Categories' tags # We need to migrate the 'Category' tags from the old_data oldtest_properties = old_entry[3] - + # use list comprehensions to build a list of matches old_matches = [item for item in oldtest_properties if item[0] == 'Categories'] @@ -316,7 +316,7 @@ if __name__ == '__main__': if not os.path.isfile(old_listfile): fatal('Error: old listfile must be valid.') - + new_data = parse_list_file(new_listfile) old_data = parse_list_file(old_listfile) @@ -324,7 +324,7 @@ if __name__ == '__main__': # Warning this completely overwrites the exisiting new_listfile write_list_file(new_listfile, new_data) - - + + diff --git a/src/tests/GC/Scenarios/Dynamo/dynamo.cs b/src/tests/GC/Scenarios/Dynamo/dynamo.cs index 05cbd172ef3..a2eb67523ed 100644 --- a/src/tests/GC/Scenarios/Dynamo/dynamo.cs +++ b/src/tests/GC/Scenarios/Dynamo/dynamo.cs @@ -244,7 +244,7 @@ namespace Dynamo { ChkRandomValues[ ChkRandomNum++ ] = Value; break; default: - Console.WriteLine( "Test error has occured: Unknown Type - {0} given", Type ); + Console.WriteLine( "Test error has occurred: Unknown Type - {0} given", Type ); break; } } diff --git a/src/tests/Interop/BestFitMapping/BestFitMapping.cs b/src/tests/Interop/BestFitMapping/BestFitMapping.cs index 77f0a3d114c..40b2aff5467 100644 --- a/src/tests/Interop/BestFitMapping/BestFitMapping.cs +++ b/src/tests/Interop/BestFitMapping/BestFitMapping.cs @@ -230,7 +230,7 @@ public class BestFitMapping //x86: Managed(Encoding: utf8)---->Marshaler(Encoding:ASCII)---->Native(Encoding:utf8) //MAC(x64):Managed(Encoding:utf8)----->Marshaler(Encoding:utf8)---->Native(Encoding:utf8) //Now both side(Managed Side and native side) takes the utf8 encoding when comparing string - + static bool Compare(string lstr, string rstr) { //Windows @@ -267,15 +267,15 @@ public class BestFitMapping } //Result From Native Side, since the Return value and Parameter are used in TestScenario. - //So have to use an extra variable to record errors occured in Native Side. - + //So have to use an extra variable to record errors occurred in Native Side. + [DllImport("BestFitMappingNative", CallingConvention = CallingConvention.Cdecl)] public static extern int GetResult(); private static int Fails = 0; #region "TestMethod" - + private static void TestMethod_CLPStr_In() { TestFramework.BeginScenario("Cdecl,LPStr,In"); @@ -303,12 +303,12 @@ public class BestFitMapping catch (Exception e) { Fails++; - TestFramework.LogError("e01", "TestMethod_CLPStr_In:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e01", "TestMethod_CLPStr_In:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_CLPStr_Out() { TestFramework.BeginScenario("Cdecl,LPStr,Out"); @@ -334,11 +334,11 @@ public class BestFitMapping catch (Exception e) { Fails++; - TestFramework.LogError("e02", "TestMethod_CLPStr_Out:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e02", "TestMethod_CLPStr_Out:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_CLPStr_InOut() { TestFramework.BeginScenario("Cdecl,LPStr,InOut"); @@ -362,14 +362,14 @@ public class BestFitMapping TestFramework.LogError("006", "TestMethod_CLPStr_InOut:The Return value is wrong."); } } - catch (Exception e) + catch (Exception e) { Fails++; - TestFramework.LogError("e03", "TestMethod_CLPStr_InOut:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e03", "TestMethod_CLPStr_InOut:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_CLPStr_InRef() { TestFramework.BeginScenario("Cdecl,LPStr,InRef"); @@ -392,14 +392,14 @@ public class BestFitMapping TestFramework.LogError("008", "TestMethod_CLPStr_InRef:The Parameter value is wrong."); } } - catch (Exception e) + catch (Exception e) { Fails++; - TestFramework.LogError("e04", "TestMethod_CLPStr_InRef:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e04", "TestMethod_CLPStr_InRef:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_CLPStr_OutRef() { TestFramework.BeginScenario("Cdecl,LPStr,OutRef"); @@ -423,14 +423,14 @@ public class BestFitMapping TestFramework.LogError("010", "TestMethod_CLPStr_OutRef:The Parameter value is wrong."); } } - catch (Exception e) + catch (Exception e) { Fails++; - TestFramework.LogError("e05", "TestMethod_CLPStr_OutRef:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e05", "TestMethod_CLPStr_OutRef:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_CLPStr_InOutRef() { TestFramework.BeginScenario("Cdecl,LPStr,InOutRef"); @@ -454,14 +454,14 @@ public class BestFitMapping TestFramework.LogError("012", "TestMethod_CLPStr_InOutRef:The Parameter value is wrong."); } } - catch (Exception e) + catch (Exception e) { Fails++; - TestFramework.LogError("e06", "TestMethod_CLPStr_InOutRef:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e06", "TestMethod_CLPStr_InOutRef:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_CLPStr_DelegatePInvoke() { TestFramework.BeginScenario("Cdecl,LPStr,DelegatePInvoke"); @@ -486,15 +486,15 @@ public class BestFitMapping TestFramework.LogError("014", "TestMethod_CLPStr_DelegatePInvoke:The Parameter value is wrong."); } } - catch (Exception e) + catch (Exception e) { Fails++; - TestFramework.LogError("e07", "TestMethod_CLPStr_DelegatePInvoke:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e07", "TestMethod_CLPStr_DelegatePInvoke:Unexpected Exception Occurred:" + e.ToString()); } } //Stdcall - + private static void TestMethod_SLPStr_In() { TestFramework.BeginScenario("StdCall,LPStr,In"); @@ -516,14 +516,14 @@ public class BestFitMapping TestFramework.LogError("016", "TestMethod_SLPStr_In:The Parameter value is wrong."); } } - catch (Exception e) + catch (Exception e) { Fails++; - TestFramework.LogError("e08", "TestMethod_SLPStr_In:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e08", "TestMethod_SLPStr_In:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_SLPStr_Out() { TestFramework.BeginScenario("StdCall,LPStr,Out"); @@ -548,14 +548,14 @@ public class BestFitMapping TestFramework.LogError("018", "TestMethod_SLPStr_Out:The Parameter value is wrong."); } } - catch (Exception e) + catch (Exception e) { Fails++; - TestFramework.LogError("e09", "TestMethod_SLPStr_Out:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e09", "TestMethod_SLPStr_Out:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_SLPStr_InOut() { TestFramework.BeginScenario("StdCall,LPStr,InOut"); @@ -578,14 +578,14 @@ public class BestFitMapping TestFramework.LogError("020", "TestMethod_SLPStr_InOut:The Return value is wrong."); } } - catch (Exception e) + catch (Exception e) { Fails++; - TestFramework.LogError("e10", "TestMethod_SLPStr_InOut:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e10", "TestMethod_SLPStr_InOut:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_SLPStr_InRef() { TestFramework.BeginScenario("StdCall,LPStr,InRef"); @@ -613,11 +613,11 @@ public class BestFitMapping catch (Exception e) { Fails++; - TestFramework.LogError("e11", "TestMethod_SLPStr_InRef:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e11", "TestMethod_SLPStr_InRef:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_SLPStr_OutRef() { TestFramework.BeginScenario("StdCall,LPStr,OutRef"); @@ -647,11 +647,11 @@ public class BestFitMapping catch (Exception e) { Fails++; - TestFramework.LogError("e12", "TestMethod_SLPStr_OutRef:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e12", "TestMethod_SLPStr_OutRef:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_SLPStr_InOutRef() { TestFramework.BeginScenario("StdCall,LPStr,InOutRef"); @@ -678,11 +678,11 @@ public class BestFitMapping catch (Exception e) { Fails++; - TestFramework.LogError("e13", "TestMethod_SLPStr_InOutRef:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e13", "TestMethod_SLPStr_InOutRef:Unexpected Exception Occurred:" + e.ToString()); } } - + private static void TestMethod_SLPStr_DelegatePInvoke() { TestFramework.BeginScenario("StdCall,LPStr,DelegatePInvoke"); @@ -709,15 +709,15 @@ public class BestFitMapping catch (Exception e) { Fails++; - TestFramework.LogError("e14", "TestMethod_SLPStr_DelegatePInvoke:Unexpected Exception Occured:" + e.ToString()); + TestFramework.LogError("e14", "TestMethod_SLPStr_DelegatePInvoke:Unexpected Exception Occurred:" + e.ToString()); } } #endregion #region "Reverse Pinvoke" - - + + public static string TestMethod_CCallBackIn(string str) { //Check Input @@ -731,16 +731,16 @@ public class BestFitMapping StringBuilder sb = GetInvalidString(); return sb.ToString(); } - - + + public static string TestMethod_CCallBackOut(StringBuilder str) { StringBuilder sb = GetInvalidString(); str.Append(sb.ToString()); return sb.ToString(); } - - + + public static string TestMethod_CCallBackInOut(StringBuilder str) { //Check Input @@ -758,8 +758,8 @@ public class BestFitMapping return sb.ToString(); } - - + + public static string TestMethod_CCallBackInByRef(ref string str) { //Check Input @@ -772,8 +772,8 @@ public class BestFitMapping StringBuilder sb = GetInvalidString(); return sb.ToString(); } - - + + public static string TestMethod_CCallBackOutByRef(out string str) { StringBuilder sb = GetInvalidString(); @@ -781,8 +781,8 @@ public class BestFitMapping str = sb.ToString(); return sb.ToString(); } - - + + public static string TestMethod_CCallBackInOutByRef(ref string str) { //Check Input @@ -797,8 +797,8 @@ public class BestFitMapping str = sb.ToString(); return sb.ToString(); } - - + + public static string TestMethod_SCallBackIn(string str) { //Check Input @@ -812,16 +812,16 @@ public class BestFitMapping StringBuilder sb = GetInvalidString(); return sb.ToString(); } - - + + public static string TestMethod_SCallBackOut(StringBuilder str) { StringBuilder sb = GetInvalidString(); str.Append(sb); return sb.ToString(); } - - + + public static string TestMethod_SCallBackInOut(StringBuilder str) { //Check Input @@ -837,8 +837,8 @@ public class BestFitMapping str.Append(sb.ToString()); return sb.ToString(); } - - + + public static string TestMethod_SCallBackInByRef(ref string str) { //Check Input @@ -853,8 +853,8 @@ public class BestFitMapping str = sb.ToString(); return sb.ToString(); } - - + + public static string TestMethod_SCallBackOutByRef(out string str) { StringBuilder sb = GetInvalidString(); @@ -862,8 +862,8 @@ public class BestFitMapping str = sb.ToString(); return sb.ToString(); } - - + + public static string TestMethod_SCallBackInOutByRef(ref string str) { //Check Input @@ -882,7 +882,7 @@ public class BestFitMapping - + public static int Main() { @@ -926,7 +926,7 @@ public class BestFitMapping DoSCallBack_LPSTR_OutByRef(new SCallBackOutByRef(TestMethod_SCallBackOutByRef)); DoSCallBack_LPSTR_InOutByRef(new SCallBackInOutByRef(TestMethod_SCallBackInOutByRef)); - //GetResult() return error occured in Native Side,Fails is equal to errors occured in ManagedSide + //GetResult() return error occurred in Native Side,Fails is equal to errors occurred in ManagedSide if (GetResult() > 0 || Fails > 0) { Console.WriteLine("Failed!"); diff --git a/src/tests/Interop/SimpleStruct/SimpleStructManaged.cs b/src/tests/Interop/SimpleStruct/SimpleStructManaged.cs index 1ddd292711c..20127efa5e3 100644 --- a/src/tests/Interop/SimpleStruct/SimpleStructManaged.cs +++ b/src/tests/Interop/SimpleStruct/SimpleStructManaged.cs @@ -361,7 +361,7 @@ namespace PInvokeTests if (retval == false) { - TestFramework.LogError("01", "PInvokeTests->PosTest3 : Unexpected error occured on unmanaged side"); + TestFramework.LogError("01", "PInvokeTests->PosTest3 : Unexpected error occurred on unmanaged side"); return false; } if ((p.type != DialogResult.OK) || (!p.b)) @@ -389,7 +389,7 @@ namespace PInvokeTests if (retval == false) { - TestFramework.LogError("01", "PInvokeTests->PosTest3 : Unexpected error occured on unmanaged side"); + TestFramework.LogError("01", "PInvokeTests->PosTest3 : Unexpected error occurred on unmanaged side"); return false; } if ((p.type != DialogResult.OK) || (!p.b)) diff --git a/src/tests/JIT/Performance/CodeQuality/SciMark/LU.cs b/src/tests/JIT/Performance/CodeQuality/SciMark/LU.cs index 91d83e7ca80..4ae62a0f636 100644 --- a/src/tests/JIT/Performance/CodeQuality/SciMark/LU.cs +++ b/src/tests/JIT/Performance/CodeQuality/SciMark/LU.cs @@ -3,9 +3,9 @@ /// /// This is a port of the SciMark2a Java Benchmark to C# by /// Chris Re (cmr28@cornell.edu) and Werner Vogels (vogels@cs.cornell.edu) -/// +/// /// For details on the original authors see http://math.nist.gov/scimark2 -/// +/// /// This software is likely to burn your processor, bitflip your memory chips /// anihilate your screen and corrupt all your disks, so you it at your /// own risk. @@ -33,14 +33,14 @@ namespace SciMark2 /// Returns a copy of the compact LU factorization. /// (useful mainly for debugging.) /// - /// + /// /// /// the compact LU factorization. The U factor /// is stored in the upper triangular portion, and the L /// factor is stored in the lower triangular portion. /// The main diagonal of L consists (by convention) of /// ones, and is not explicitly stored. - /// + /// public static double num_flops(int N) { // rougly 2/3*N^3 @@ -95,11 +95,11 @@ namespace SciMark2 } /// - /// Initalize LU factorization from matrix. + /// Initialize LU factorization from matrix. /// /// /// (in) the matrix to associate with this factorization. - /// + /// /// public LU(double[][] A) { @@ -150,7 +150,7 @@ namespace SciMark2 for (int j = 0; j < minMN; j++) { - // find pivot in column j and test for singularity. + // find pivot in column j and test for singularity. int jp = j; double t = Math.Abs(A[j][j]); @@ -166,8 +166,8 @@ namespace SciMark2 pivot[j] = jp; - // jp now has the index of maximum element - // of column j, below the diagonal + // jp now has the index of maximum element + // of column j, below the diagonal if (A[jp][j] == 0) return 1; @@ -217,7 +217,7 @@ namespace SciMark2 /// Solve a linear system, using a prefactored matrix /// in LU form. /// - /// (in) the factored matrix in LU form. + /// (in) the factored matrix in LU form. /// /// (in) the pivot vector which lists /// the reordering used during the factorization @@ -225,7 +225,7 @@ namespace SciMark2 /// /// (in/out) On input, the right-hand side. /// On output, the solution vector. - /// + /// /// public static void solve(double[][] A, int[] pvt, double[] b) { diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il b/src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il index 71551936633..d114e7d95b8 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il @@ -21,13 +21,13 @@ .field [0] public int32 firstField .field [0x7FFFFF9] public int32 lastField - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ret - } + } } .class public explicit ansi sealed value beforefieldinit BigStruct @@ -41,10 +41,10 @@ .class public auto ansi beforefieldinit TestClass extends [mscorlib]System.Object { -// Global field to store the the big class +// Global field to store the big class .field static class BigClass s_bigClass -// Global field to store the the big struct +// Global field to store the big struct .field static valuetype BigStruct s_bigStruct .method public hidebysig static int32 Main(string [] args) cil managed @@ -54,7 +54,7 @@ ) .entrypoint .locals init (int32 retValue) - + ldarg.0 call bool TestClass::Test1(string [] args) brfalse.s FAILED @@ -78,7 +78,7 @@ PASSED: FAILED: ldc.i4.s 101 stloc.0 - + RET: ldloc.0 ret @@ -88,7 +88,7 @@ RET: { .locals init (int32 val) // adding some conditional code so the JIT can't optimize it - + ldarg.0 ldlen conv.i4 @@ -107,7 +107,7 @@ NEXT: ldsfld class BigClass TestClass::s_bigClass stloc.0 IL_0000: ret - } + } .method public hidebysig static bool Test1(string [] args) cil managed { @@ -135,7 +135,7 @@ FAILED: ldc.i4.s 0 stloc.0 -RET: +RET: ldloc.0 ret } @@ -144,7 +144,7 @@ RET: { .locals init (valuetype BigStruct &pBigStruct, int32 val) // adding some conditional code so the JIT can't optimize it - + ldarg.0 ldlen conv.i4 @@ -161,13 +161,13 @@ NEXT: ldloc.0 stloc.1 - ldstr "Value: {0}" + ldstr "Value: {0}" ldloc.1 box [mscorlib]System.Int32 call void [System.Console]System.Console::WriteLine(string, object) IL_0000: ret - } + } .method public hidebysig static bool Test2(string [] args) cil managed { @@ -195,7 +195,7 @@ FAILED: ldc.i4.s 0 stloc.0 -RET: +RET: ldloc.0 ret } @@ -204,7 +204,7 @@ RET: { .locals init (valuetype BigStruct &pBigStruct, int32 prevVal, int32 newVal) // adding some conditional code so the JIT can't optimize it - + ldarg.0 ldlen conv.i4 @@ -224,7 +224,7 @@ NEXT: ldloc.0 ldloc.0 ldc.i4.s 11 stfld int32 BigStruct::lastField - + ldloc.0 ldfld int32 BigStruct::lastField stloc.1 @@ -237,7 +237,7 @@ NEXT: ldloc.0 call void [System.Console]System.Console::WriteLine(string, object, object) IL_0000: ret - } + } .method public hidebysig static bool Test3(string [] args) cil managed { @@ -265,8 +265,8 @@ FAILED: ldc.i4.s 0 stloc.0 -RET: +RET: ldloc.0 ret } -} +} diff --git a/src/tests/readytorun/tests/main.cs b/src/tests/readytorun/tests/main.cs index 8dc6faaaa6d..09313a7c3d0 100644 --- a/src/tests/readytorun/tests/main.cs +++ b/src/tests/readytorun/tests/main.cs @@ -134,7 +134,7 @@ class Program MyClass.TestStaticFields(); #if false // TODO: Enable once LDFTN is supported - Task.Run(() => { + Task.Run(() => { MyClass.ThreadStaticStringField = "Garbage"; MyClass.ThreadStaticIntField = 0xBAAD; MyClass.ThreadStaticDateTimeField = DateTime.Now; @@ -357,7 +357,7 @@ class Program static void TestOpenClosedDelegate() { - // This test is verifying the the fixups for open vs. closed delegate created against the same target + // This test is verifying the fixups for open vs. closed delegate created against the same target // method are encoded correctly. Func idOpen = OpenClosedDelegateExtension.OpenClosedDelegateTarget; @@ -366,11 +366,11 @@ class Program Func idClosed = "World".OpenClosedDelegateTarget; Assert.AreEqual(idClosed("hey"), "World, hey"); } - + static void GenericLdtokenFieldsTest() { Func FieldFullName = (fi) => fi.FieldType + " " + fi.DeclaringType.ToString() + "::" + fi.Name; - + IFieldGetter getter1 = new FieldGetter(); IFieldGetter getter2 = new FieldGetter(); IFieldGetter getter3 = new FieldGetter(); @@ -390,7 +390,7 @@ class Program string expectedDllField3 = "System.Collections.Generic.List`1[???] MyGeneric`2[???,???]::m_Field3".Replace("???", instArg.ToString()); string expectedDllField4 = "System.Collections.Generic.KeyValuePair`2[???,System.Int32] MyGeneric`2[???,???]::m_Field4".Replace("???", instArg.ToString()); string expectedDllField5 = "System.Int32 MyGeneric`2[???,???]::m_Field5".Replace("???", instArg.ToString()); - + Assert.AreEqual(expectedField1, FieldFullName(getter.GetGenT_Field1())); Assert.AreEqual(expectedField2, FieldFullName(getter.GetGenT_Field2())); Assert.AreEqual(expectedField3, FieldFullName(getter.GetGenT_Field3())); @@ -415,10 +415,10 @@ class Program static void TestLoadR2RImageFromByteArray() { Assembly assembly1 = typeof(Program).Assembly; - + byte[] array = File.ReadAllBytes(assembly1.Location); Assembly assembly2 = Assembly.Load(array); - + Assert.AreEqual(assembly2.FullName, assembly1.FullName); } @@ -470,11 +470,11 @@ class Program TestRangeCheckElimination(); TestOpenClosedDelegate(); - + GenericLdtokenFieldsTest(); RVAFieldTest(); - + TestLoadR2RImageFromByteArray(); } diff --git a/src/tests/run.py b/src/tests/run.py index b749c61cc42..36007f3383f 100755 --- a/src/tests/run.py +++ b/src/tests/run.py @@ -295,7 +295,7 @@ REM REM Notes: REM REM This wrapper is automatically generated by run.py. It includes the -REM necessary environment to reproduce a failure that occured during running +REM necessary environment to reproduce a failure that occurred during running REM the tests. REM REM In order to change how this wrapper is generated, see @@ -338,7 +338,7 @@ echo Core_Root is set to: "%%CORE_ROOT%%" # Notes: # # This wrapper is automatically generated by run.py. It includes the -# necessary environment to reproduce a failure that occured during running +# necessary environment to reproduce a failure that occurred during running # the tests. # # In order to change how this wrapper is generated, see diff --git a/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.cs b/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.cs index b1455d01e21..b8e7569ff34 100644 --- a/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.cs +++ b/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.cs @@ -40,9 +40,9 @@ namespace Tracing.Tests.DiagnosticPortValidation int subprocessId = -1; Task subprocessTask = Utils.RunSubprocess( currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticPortsEnvKey, dotnetDiagnosticPorts } + environment: new Dictionary + { + { Utils.DiagnosticPortsEnvKey, dotnetDiagnosticPorts } }, duringExecution: async (int pid) => { @@ -52,7 +52,7 @@ namespace Tracing.Tests.DiagnosticPortValidation { var (server, _) = serverAndNames[i]; int serverIndex = i; - tasks.Add(Task.Run(async () => + tasks.Add(Task.Run(async () => { Stream stream = await server.AcceptAsync(); IpcAdvertise advertise = IpcAdvertise.Parse(stream); @@ -102,21 +102,21 @@ namespace Tracing.Tests.DiagnosticPortValidation int subprocessId = -1; Task subprocessTask = Utils.RunSubprocess( currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticPortsEnvKey, dotnetDiagnosticPorts } + environment: new Dictionary + { + { Utils.DiagnosticPortsEnvKey, dotnetDiagnosticPorts } }, duringExecution: async (int pid) => { subprocessId = pid; - // Create an eventpipe session that will tell us when + // Create an eventpipe session that will tell us when // the EEStartupStarted event happens. This will tell us - // the the runtime has been resumed. This should only happen + // the runtime has been resumed. This should only happen // AFTER all suspend ports have sent the resume command. var config = new SessionConfiguration( circularBufferSizeMB: 1000, format: EventPipeSerializationFormat.NetTrace, - providers: new List { + providers: new List { new Provider("Microsoft-Windows-DotNETRuntimePrivate", 0x80000000, EventLevel.Verbose), // workaround for https://github.com/dotnet/runtime/issues/44072 which happens because the // above provider only sends 2 events and that can cause EventPipeEventSource (from TraceEvent) @@ -131,7 +131,7 @@ namespace Tracing.Tests.DiagnosticPortValidation var mre = new ManualResetEvent(false); - Task readerTask = Task.Run(async () => + Task readerTask = Task.Run(async () => { Logger.logger.Log($"Creating EventPipeEventSource"); using var source = new EventPipeEventSource(eventStream); @@ -207,21 +207,21 @@ namespace Tracing.Tests.DiagnosticPortValidation int subprocessId = -1; Task subprocessTask = Utils.RunSubprocess( currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticPortSuspend, "1" } + environment: new Dictionary + { + { Utils.DiagnosticPortSuspend, "1" } }, duringExecution: async (int pid) => { subprocessId = pid; - // Create an eventpipe session that will tell us when + // Create an eventpipe session that will tell us when // the EEStartupStarted event happens. This will tell us - // the the runtime has been resumed. This should only happen + // the runtime has been resumed. This should only happen // AFTER all suspend ports have sent the resume command. var config = new SessionConfiguration( circularBufferSizeMB: 1000, format: EventPipeSerializationFormat.NetTrace, - providers: new List { + providers: new List { new Provider("Microsoft-Windows-DotNETRuntimePrivate", 0x80000000, EventLevel.Verbose), // workaround for https://github.com/dotnet/runtime/issues/44072 which happens because the // above provider only sends 2 events and that can cause EventPipeEventSource (from TraceEvent) @@ -236,7 +236,7 @@ namespace Tracing.Tests.DiagnosticPortValidation var mre = new ManualResetEvent(false); - Task readerTask = Task.Run(async () => + Task readerTask = Task.Run(async () => { Logger.logger.Log($"Creating EventPipeEventSource"); using var source = new EventPipeEventSource(eventStream); @@ -347,9 +347,9 @@ namespace Tracing.Tests.DiagnosticPortValidation int subprocessId = -1; Task subprocessTask = Utils.RunSubprocess( currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary - { - { Utils.DiagnosticPortsEnvKey, dotnetDiagnosticPorts } + environment: new Dictionary + { + { Utils.DiagnosticPortsEnvKey, dotnetDiagnosticPorts } }, duringExecution: async (int pid) => { @@ -359,7 +359,7 @@ namespace Tracing.Tests.DiagnosticPortValidation { var (server, _) = serverAndNames[i]; int serverIndex = i; - tasks.Add(Task.Run(async () => + tasks.Add(Task.Run(async () => { Stream stream = await server.AcceptAsync(); IpcAdvertise advertise = IpcAdvertise.Parse(stream); @@ -393,7 +393,7 @@ namespace Tracing.Tests.DiagnosticPortValidation bool fSuccess = true; Task subprocessTask = Utils.RunSubprocess( currentAssembly: Assembly.GetExecutingAssembly(), - environment: new Dictionary + environment: new Dictionary { { Utils.DiagnosticPortSuspend, "1" } },