From a083d65b84428784901cf8bacdf8403be18fa78f Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Wed, 4 Jun 2025 11:44:46 +0200 Subject: [PATCH 01/26] Sync x86 GC info decoder (#5485) This is minimal change to get support for decoding no-GC regions. --- src/shared/README.txt | 1 + src/shared/gcdump/i386/gcdumpx86.cpp | 57 +++++++---- src/shared/inc/gcdecoder.cpp | 27 ++++- src/shared/inc/gcinfotypes.h | 141 +++++++++++++++------------ 4 files changed, 135 insertions(+), 91 deletions(-) diff --git a/src/shared/README.txt b/src/shared/README.txt index bd1748dbc9..0d3406cce4 100644 --- a/src/shared/README.txt +++ b/src/shared/README.txt @@ -3,6 +3,7 @@ The "shared" directory contains the common code between the runtime and diagnost It is also shared by the dbgshim and SOS components. Updated last on 8/14/2024 from the runtime repo commit hash: 96bcf7150deba280a070c6a4d85ca0640e405278 +X86 GC info decoding changes were cherry-picked on 5/16/2025 from the runtime repo commit hash: b85dd69a8e1acb95f70b4a9d82e97213406a3eba runtime/src/coreclr/inc -> diagnostics/src/shared/inc runtime/src/coreclr/debug/dbgutil -> diagnostics/src/shared/debug/dbgutil diff --git a/src/shared/gcdump/i386/gcdumpx86.cpp b/src/shared/gcdump/i386/gcdumpx86.cpp index 680504db6f..bb85705b45 100644 --- a/src/shared/gcdump/i386/gcdumpx86.cpp +++ b/src/shared/gcdump/i386/gcdumpx86.cpp @@ -13,7 +13,6 @@ #endif #include "gcdump.h" - /*****************************************************************************/ #define castto(var,typ) (*(typ *)&var) @@ -115,6 +114,17 @@ size_t GCDump::DumpInfoHdr (PTR_CBYTE gcInfoBlock, header->revPInvokeOffset = count; } + if (header->noGCRegionCnt == HAS_NOGCREGIONS) + { + hasArgTabOffset = TRUE; + table += decodeUnsigned(table, &count); + header->noGCRegionCnt = count; + } + else if (header->noGCRegionCnt > 0) + { + hasArgTabOffset = TRUE; + } + // // First print out all the basic information // @@ -157,6 +167,8 @@ size_t GCDump::DumpInfoHdr (PTR_CBYTE gcInfoBlock, gcPrintf(" Sync region = [%u,%u] ([0x%x,0x%x])\n", header->syncStartOffset, header->syncEndOffset, header->syncStartOffset, header->syncEndOffset); + if (header->noGCRegionCnt > 0) + gcPrintf(" no GC region count = %2u \n", header->noGCRegionCnt); if (header->epilogCount > 1 || (header->epilogCount != 0 && header->epilogAtEnd == 0)) @@ -205,11 +217,6 @@ size_t GCDump::DumpInfoHdr (PTR_CBYTE gcInfoBlock, } /*****************************************************************************/ - -#ifdef _PREFAST_ -#pragma warning(push) -#pragma warning(disable:21000) // Suppress PREFast warning about overly large function -#endif size_t GCDump::DumpGCTable(PTR_CBYTE table, const InfoHdr& header, unsigned methodSize, @@ -238,6 +245,23 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, if (header.ebxSaved) calleeSavedRegs++; } + /* Dump the no GC region table */ + + if (header.noGCRegionCnt > 0) + { + count = header.noGCRegionCnt; + while (count-- > 0) + { + unsigned regionOffset; + unsigned regionSize; + + table += decodeUnsigned(table, ®ionOffset); + table += decodeUnsigned(table, ®ionSize); + + gcPrintf("[%04X-%04X) no GC region\n", regionOffset, regionOffset + regionSize); + } + } + /* Dump the untracked frame variable table */ count = header.untrackedCnt; @@ -323,11 +347,7 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, gcPrintf("%s%s pointer\n", (lowBits & byref_OFFSET_FLAG) ? "byref " : "", -#ifndef FEATURE_EH_FUNCLETS - (lowBits & this_OFFSET_FLAG) ? "this" : "" -#else (lowBits & pinned_OFFSET_FLAG) ? "pinned" : "" -#endif ); _ASSERTE(endOffs <= methodSize); @@ -456,10 +476,6 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, /* non-ptr arg push */ curOffs += (val & 0x07); -#ifndef FEATURE_EH_FUNCLETS - // For funclets, non-ptr arg pushes can be reported even for EBP frames - _ASSERTE(!header.ebpFrame); -#endif // FEATURE_EH_FUNCLETS argCnt++; DumpEncoding(bp, table-bp); bp = table; @@ -681,9 +697,6 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, { argTab += decodeUnsigned(argTab, &val); -#ifndef FEATURE_EH_FUNCLETS - assert((val & this_OFFSET_FLAG) == 0); -#endif unsigned stkOffs = val & ~byref_OFFSET_FLAG; unsigned lowBit = val & byref_OFFSET_FLAG; @@ -939,10 +952,6 @@ size_t GCDump::DumpGCTable(PTR_CBYTE table, return (table - tableStart); } -#ifdef _PREFAST_ -#pragma warning(pop) -#endif - /*****************************************************************************/ @@ -1016,6 +1025,12 @@ void GCDump::DumpPtrsInFrame(PTR_CBYTE gcInfoBlock, header.revPInvokeOffset = offset; _ASSERTE(offset != INVALID_REV_PINVOKE_OFFSET); } + if (header.noGCRegionCnt == HAS_NOGCREGIONS) + { + unsigned count; + table += decodeUnsigned(table, &count); + header.noGCRegionCnt = count; + } prologSize = header.prologSize; epilogSize = header.epilogSize; diff --git a/src/shared/inc/gcdecoder.cpp b/src/shared/inc/gcdecoder.cpp index d4a3c4c3a6..26001f5889 100644 --- a/src/shared/inc/gcdecoder.cpp +++ b/src/shared/inc/gcdecoder.cpp @@ -205,9 +205,22 @@ PTR_CBYTE FASTCALL decodeHeader(PTR_CBYTE table, UINT32 version, InfoHdr* header nextByte = *table++; encoding = nextByte & ADJ_ENCODING_MAX; // encoding here always corresponds to codes in InfoHdrAdjust2 set - - _ASSERTE(encoding < SET_RET_KIND_MAX); - header->returnKind = (ReturnKind)encoding; + if (encoding <= SET_RET_KIND_MAX) + { + header->returnKind = (ReturnKind)encoding; + } + else if (encoding < FFFF_NOGCREGION_CNT) + { + header->noGCRegionCnt = encoding - SET_NOGCREGIONS_CNT; + } + else if (encoding == FFFF_NOGCREGION_CNT) + { + header->noGCRegionCnt = HAS_NOGCREGIONS; + } + else + { + _ASSERTE(!"Unexpected encoding"); + } break; } } @@ -470,7 +483,8 @@ bool InfoHdrSmall::isHeaderMatch(const InfoHdr& target) const target.varPtrTableSize != HAS_VARPTR && target.gsCookieOffset != HAS_GS_COOKIE_OFFSET && target.syncStartOffset != HAS_SYNC_OFFSET && - target.revPInvokeOffset != HAS_REV_PINVOKE_FRAME_OFFSET); + target.revPInvokeOffset != HAS_REV_PINVOKE_FRAME_OFFSET && + target.noGCRegionCnt != HAS_NOGCREGIONS); #endif // compare two InfoHdr's up to but not including the untrackCnt field @@ -495,7 +509,10 @@ bool InfoHdrSmall::isHeaderMatch(const InfoHdr& target) const if (target.syncStartOffset != INVALID_SYNC_OFFSET) return false; - if (target.revPInvokeOffset!= INVALID_REV_PINVOKE_OFFSET) + if (target.revPInvokeOffset != INVALID_REV_PINVOKE_OFFSET) + return false; + + if (target.noGCRegionCnt > 0) return false; return true; diff --git a/src/shared/inc/gcinfotypes.h b/src/shared/inc/gcinfotypes.h index f6620f7ac7..10d22d6709 100644 --- a/src/shared/inc/gcinfotypes.h +++ b/src/shared/inc/gcinfotypes.h @@ -5,11 +5,6 @@ #ifndef __GCINFOTYPES_H__ #define __GCINFOTYPES_H__ -// HACK: debugreturn.h breaks constexpr -#ifdef debug_instrumented_return -#undef return -#endif // debug_instrumented_return - // HACK: debugreturn.h breaks constexpr #if defined(debug_instrumented_return) || defined(_DEBUGRETURN_H_) #undef return @@ -118,6 +113,8 @@ struct GcStackSlot } }; +// ReturnKind is not encoded in GCInfo v4 and later, except on x86. + //-------------------------------------------------------------------------------- // ReturnKind -- encoding return type information in GcInfo // @@ -142,61 +139,6 @@ struct GcStackSlot // //-------------------------------------------------------------------------------- -// RT_Unset: An intermediate step for staged bringup. -// When ReturnKind is RT_Unset, it means that the JIT did not set -// the ReturnKind in the GCInfo, and therefore the VM cannot rely on it, -// and must use other mechanisms (similar to GcInfo ver 1) to determine -// the Return type's GC information. -// -// RT_Unset is only used in the following situations: -// X64: Used by JIT64 until updated to use GcInfo v2 API -// ARM: Used by JIT32 until updated to use GcInfo v2 API -// -// RT_Unset should have a valid encoding, whose bits are actually stored in the image. -// For X86, there are no free bits, and there's no RT_Unused enumeration. - -#if defined(TARGET_X86) - -// 00 RT_Scalar -// 01 RT_Object -// 10 RT_ByRef -// 11 RT_Float - -#elif defined(TARGET_ARM) - -// 00 RT_Scalar -// 01 RT_Object -// 10 RT_ByRef -// 11 RT_Unset - -#elif defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) - -// Slim Header: - -// 00 RT_Scalar -// 01 RT_Object -// 10 RT_ByRef -// 11 RT_Unset - -// Fat Header: - -// 0000 RT_Scalar -// 0001 RT_Object -// 0010 RT_ByRef -// 0011 RT_Unset -// 0100 RT_Scalar_Obj -// 1000 RT_Scalar_ByRef -// 0101 RT_Obj_Obj -// 1001 RT_Obj_ByRef -// 0110 RT_ByRef_Obj -// 1010 RT_ByRef_ByRef - -#else -#ifdef PORTABILITY_WARNING -PORTABILITY_WARNING("Need ReturnKind for new Platform") -#endif // PORTABILITY_WARNING -#endif // Target checks - enum ReturnKind { // Cases for Return in one register @@ -378,7 +320,8 @@ enum infoHdrAdjustConstants { SET_EPILOGSIZE_MAX = 10, // Change to 6 SET_EPILOGCNT_MAX = 4, SET_UNTRACKED_MAX = 3, - SET_RET_KIND_MAX = 4, // 2 bits for ReturnKind + SET_RET_KIND_MAX = 3, // 2 bits for ReturnKind + SET_NOGCREGIONS_MAX = 4, ADJ_ENCODING_MAX = 0x7f, // Maximum valid encoding in a byte // Also used to mask off next bit from each encoding byte. MORE_BYTES_TO_FOLLOW = 0x80 // If the High-bit of a header or adjustment byte @@ -430,10 +373,13 @@ enum infoHdrAdjust { // Second set of opcodes, when first code is 0x4F enum infoHdrAdjust2 { SET_RETURNKIND = 0, // 0x00-SET_RET_KIND_MAX Set ReturnKind to value + SET_NOGCREGIONS_CNT = SET_RETURNKIND + SET_RET_KIND_MAX + 1, // 0x04 + FFFF_NOGCREGION_CNT = SET_NOGCREGIONS_CNT + SET_NOGCREGIONS_MAX + 1 // 0x09 There is a count (>SET_NOGCREGIONS_MAX) after the header encoding }; #define HAS_UNTRACKED ((unsigned int) -1) #define HAS_VARPTR ((unsigned int) -1) +#define HAS_NOGCREGIONS ((unsigned int) -1) // 0 is a valid offset for the Reverse P/Invoke block // So use -1 as the sentinel for invalid and -2 as the sentinel for present. @@ -482,7 +428,7 @@ struct InfoHdrSmall { unsigned short argCount; // 5,6 in bytes unsigned int frameSize; // 7,8,9,10 in bytes unsigned int untrackedCnt; // 11,12,13,14 - unsigned int varPtrTableSize; // 15.16,17,18 + unsigned int varPtrTableSize; // 15,16,17,18 // Checks whether "this" is compatible with "target". // It is not an exact bit match as "this" could have some @@ -500,7 +446,8 @@ struct InfoHdr : public InfoHdrSmall { unsigned int syncStartOffset; // 23,24,25,26 unsigned int syncEndOffset; // 27,28,29,30 unsigned int revPInvokeOffset; // 31,32,33,34 Available GcInfo v2 onwards, previously undefined - // 35 bytes total + unsigned int noGCRegionCnt; // 35,36,37,38 + // 39 bytes total // Checks whether "this" is compatible with "target". // It is not an exact bit match as "this" could have some @@ -515,7 +462,8 @@ struct InfoHdr : public InfoHdrSmall { target.varPtrTableSize != HAS_VARPTR && target.gsCookieOffset != HAS_GS_COOKIE_OFFSET && target.syncStartOffset != HAS_SYNC_OFFSET && - target.revPInvokeOffset != HAS_REV_PINVOKE_FRAME_OFFSET); + target.revPInvokeOffset != HAS_REV_PINVOKE_FRAME_OFFSET && + target.noGCRegionCnt != HAS_NOGCREGIONS); #endif // compare two InfoHdr's up to but not including the untrackCnt field @@ -546,6 +494,13 @@ struct InfoHdr : public InfoHdrSmall { (target.revPInvokeOffset == INVALID_REV_PINVOKE_OFFSET)) return false; + if (noGCRegionCnt != target.noGCRegionCnt) { + if (target.noGCRegionCnt <= SET_NOGCREGIONS_MAX) + return false; + else if (noGCRegionCnt != HAS_UNTRACKED) + return false; + } + return true; } }; @@ -576,6 +531,7 @@ inline void GetInfoHdr(int index, InfoHdr * header) header->syncStartOffset = INVALID_SYNC_OFFSET; header->syncEndOffset = INVALID_SYNC_OFFSET; header->revPInvokeOffset = INVALID_REV_PINVOKE_OFFSET; + header->noGCRegionCnt = 0; } PTR_CBYTE FASTCALL decodeHeader(PTR_CBYTE table, UINT32 version, InfoHdr* header); @@ -970,9 +926,64 @@ struct X86GcInfoEncoding { #endif // defined(TARGET_xxx) +#ifdef FEATURE_INTERPRETER + +struct InterpreterGcInfoEncoding { + static const uint32_t NUM_NORM_CODE_OFFSETS_PER_CHUNK = (64); + + static const uint32_t NUM_NORM_CODE_OFFSETS_PER_CHUNK_LOG2 = (6); + // Interpreter-FIXME: Interpreter has fixed-size stack slots so we could normalize them based on that. + static inline constexpr int32_t NORMALIZE_STACK_SLOT (int32_t x) { return (x); } + static inline constexpr int32_t DENORMALIZE_STACK_SLOT (int32_t x) { return (x); } + // Interpreter-FIXME: Interpreter has fixed-size opcodes so code length is a multiple of that. + static inline constexpr uint32_t NORMALIZE_CODE_LENGTH (uint32_t x) { return (x); } + static inline constexpr uint32_t DENORMALIZE_CODE_LENGTH (uint32_t x) { return (x); } + + static inline constexpr uint32_t NORMALIZE_STACK_BASE_REGISTER (uint32_t x) { return (x); } + static inline constexpr uint32_t DENORMALIZE_STACK_BASE_REGISTER (uint32_t x) { return (x); } + // Interpreter-FIXME: Interpreter has fixed-size stack slots so we could normalize them based on that. + static inline constexpr uint32_t NORMALIZE_SIZE_OF_STACK_AREA (uint32_t x) { return (x); } + static inline constexpr uint32_t DENORMALIZE_SIZE_OF_STACK_AREA (uint32_t x) { return (x); } + static const bool CODE_OFFSETS_NEED_NORMALIZATION = false; + // Interpreter-FIXME: Interpreter has fixed-size opcodes so code length is a multiple of that. + static inline constexpr uint32_t NORMALIZE_CODE_OFFSET (uint32_t x) { return (x); } + static inline constexpr uint32_t DENORMALIZE_CODE_OFFSET (uint32_t x) { return (x); } + + static const int PSP_SYM_STACK_SLOT_ENCBASE = 6; + static const int GENERICS_INST_CONTEXT_STACK_SLOT_ENCBASE = 6; + static const int SECURITY_OBJECT_STACK_SLOT_ENCBASE = 6; + static const int GS_COOKIE_STACK_SLOT_ENCBASE = 6; + static const int CODE_LENGTH_ENCBASE = 8; + static const int STACK_BASE_REGISTER_ENCBASE = 3; + static const int SIZE_OF_STACK_AREA_ENCBASE = 3; + static const int SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA_ENCBASE = 4; + // Interpreter-FIXME: This constant is only used on certain architectures. + static const int SIZE_OF_EDIT_AND_CONTINUE_FIXED_STACK_FRAME_ENCBASE = 4; + static const int REVERSE_PINVOKE_FRAME_ENCBASE = 6; + static const int NUM_REGISTERS_ENCBASE = 2; + static const int NUM_STACK_SLOTS_ENCBASE = 2; + static const int NUM_UNTRACKED_SLOTS_ENCBASE = 1; + static const int NORM_PROLOG_SIZE_ENCBASE = 5; + static const int NORM_EPILOG_SIZE_ENCBASE = 3; + static const int NORM_CODE_OFFSET_DELTA_ENCBASE = 3; + static const int INTERRUPTIBLE_RANGE_DELTA1_ENCBASE = 6; + static const int INTERRUPTIBLE_RANGE_DELTA2_ENCBASE = 6; + static const int REGISTER_ENCBASE = 3; + static const int REGISTER_DELTA_ENCBASE = 2; + static const int STACK_SLOT_ENCBASE = 6; + static const int STACK_SLOT_DELTA_ENCBASE = 4; + static const int NUM_SAFE_POINTS_ENCBASE = 2; + static const int NUM_INTERRUPTIBLE_RANGES_ENCBASE = 1; + static const int NUM_EH_CLAUSES_ENCBASE = 2; + static const int POINTER_SIZE_ENCBASE = 3; + static const int LIVESTATE_RLE_RUN_ENCBASE = 2; + static const int LIVESTATE_RLE_SKIP_ENCBASE = 4; +}; + +#endif // FEATURE_INTERPRETER + #ifdef debug_instrumented_return #define return debug_instrumented_return #endif // debug_instrumented_return #endif // !__GCINFOTYPES_H__ - From 30592b41a2d7e4f67567cb61a0c3951cb3c56673 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Jun 2025 11:10:34 -0700 Subject: [PATCH 02/26] Update EOL Ubuntu buildtools containers to Ubuntu 22.04 (#5498) This PR updates End-of-Life Ubuntu buildtools container references to the supported Ubuntu 22.04 version. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: steveisok <471438+steveisok@users.noreply.github.com> Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com> --- diagnostics.yml | 15 --------------- eng/pipelines/pipeline-resources.yml | 10 +++------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/diagnostics.yml b/diagnostics.yml index 03778eaebb..daab98353a 100644 --- a/diagnostics.yml +++ b/diagnostics.yml @@ -206,21 +206,6 @@ extends: # # ############################ - - template: /eng/pipelines/build.yml - parameters: - jobTemplate: ${{ variables.jobTemplate }} - name: Ubuntu_20_04 - osGroup: Linux - container: test_ubuntu_20_04 - dependsOn: Linux - testOnly: true - buildConfigs: - - configuration: Release - architecture: x64 - - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - - configuration: Debug - architecture: x64 - - template: /eng/pipelines/build.yml parameters: jobTemplate: ${{ variables.jobTemplate }} diff --git a/eng/pipelines/pipeline-resources.yml b/eng/pipelines/pipeline-resources.yml index 6c418d6693..6733c0dadb 100644 --- a/eng/pipelines/pipeline-resources.yml +++ b/eng/pipelines/pipeline-resources.yml @@ -53,17 +53,17 @@ extends: ROOTFS_DIR: /crossrootfs/arm64 linux_s390x: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-s390x + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-s390x env: ROOTFS_DIR: /crossrootfs/s390x linux_ppc64le: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-ppc64le + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-ppc64le env: ROOTFS_DIR: /crossrootfs/ppc64le linux_riscv64: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-riscv64 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-riscv64 env: ROOTFS_DIR: /crossrootfs/riscv64 @@ -85,10 +85,6 @@ extends: test_opensuse_15_2: image: mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 - test_ubuntu_20_04: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04 - options: '--env PYTHONPATH=/usr/bin/python3.8' - test_ubuntu_22_04: image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04 options: '--env PYTHONPATH=/usr/bin/python3.10' From 6b1e6c531cb5167f9157d68d21724d42d2ad6537 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Mon, 16 Jun 2025 20:59:00 +0300 Subject: [PATCH 03/26] Auto-detect LLDB.h and liblldb-dev versions (#5497) Instead of hardcoding several dozen llvm versions from 3.5 to 21, lets just use the latest available llvm version from LLDB.h path then find the matching liblldb version. --------- Co-authored-by: Noah Falk --- src/SOS/Strike/disasm.h | 2 +- src/SOS/lldbplugin/CMakeLists.txt | 103 ++++++++++++++++-------------- 2 files changed, 56 insertions(+), 49 deletions(-) diff --git a/src/SOS/Strike/disasm.h b/src/SOS/Strike/disasm.h index 82ad583780..f50bbd768f 100644 --- a/src/SOS/Strike/disasm.h +++ b/src/SOS/Strike/disasm.h @@ -77,7 +77,7 @@ struct SOSEHInfo UINT EHCount; CLRDATA_ADDRESS methodStart; - SOSEHInfo() { ZeroMemory(this, sizeof(SOSEHInfo)); } + SOSEHInfo() { ZeroMemory(static_cast(this), sizeof(SOSEHInfo)); } ~SOSEHInfo() { if (m_pInfos) { delete [] m_pInfos; } } void FormatForDisassembly(CLRDATA_ADDRESS offSet); diff --git a/src/SOS/lldbplugin/CMakeLists.txt b/src/SOS/lldbplugin/CMakeLists.txt index 76dc0ecc7b..5ed1f71759 100644 --- a/src/SOS/lldbplugin/CMakeLists.txt +++ b/src/SOS/lldbplugin/CMakeLists.txt @@ -42,66 +42,73 @@ if(NOT ENABLE_LLDBPLUGIN) return() endif() +if(NOT "$ENV{LLDB_H}" STREQUAL "") + set(LLDB_H "$ENV{LLDB_H}") +else() + # Glob matching LLDB headers in standard locations + file(GLOB LLDB_H_PATHS + "$ENV{ROOTFS_DIR}/usr/lib/llvm-*/include/lldb/API/LLDB.h" + "$ENV{ROOTFS_DIR}/usr/local/llvm*/include/lldb/API/LLDB.h" + "$ENV{ROOTFS_DIR}/usr/include/lldb/API/LLDB.h" + ) + + # Add explicitly specified path if provided + if(WITH_LLDB_INCLUDES) + file(GLOB EXTRA_LLDB_H_PATHS "${WITH_LLDB_INCLUDES}/lldb/API/LLDB.h") + list(APPEND LLDB_H_PATHS ${EXTRA_LLDB_H_PATHS}) + endif() + + # Sort the list to get the highest version last + list(SORT LLDB_H_PATHS COMPARE NATURAL) + + list(LENGTH LLDB_H_PATHS LLDB_H_PATHS_LEN) + if(LLDB_H_PATHS_LEN GREATER 0) + list(GET LLDB_H_PATHS -1 LATEST_LLDB_H_PATH) + # Go up 3 levels from lldb/API/LLDB.h -> include + get_filename_component(LLDB_H "${LATEST_LLDB_H_PATH}" DIRECTORY) # .../API + get_filename_component(LLDB_H "${LLDB_H}" DIRECTORY) # .../lldb + get_filename_component(LLDB_H "${LLDB_H}" DIRECTORY) # .../include + + # Extract LLVM version from LLDB_H path: match llvm-XX or llvmXX + string(REGEX MATCH "llvm[-]?([0-9]+)" LLVM_VERSION_MATCH "${LLDB_H}") + if(LLVM_VERSION_MATCH) + string(REGEX REPLACE "llvm[-]?([0-9]+)" "\\1" LLDB_LLVM_VERSION "${LLVM_VERSION_MATCH}") + message(STATUS "Detected LLVM version: ${LLDB_LLVM_VERSION}") + endif() + else() + if(REQUIRE_LLDBPLUGIN) + set(MESSAGE_MODE FATAL_ERROR) + else() + set(MESSAGE_MODE WARNING) + endif() + message(${MESSAGE_MODE} "Cannot find LLDB.h. Try installing lldb-dev. You may need to set LLVM_HOME or LLDB_INCLUDE_DIR.") + return() + endif() +endif() + +message(STATUS "LLDB_H: ${LLDB_H}") + if(NOT $ENV{LLDB_LIB} STREQUAL "") set(LLDB_LIB "$ENV{LLDB_LIB}") else() # Check for LLDB library if(CLR_CMAKE_HOST_OSX) - find_library(LLDB_LIB NAMES LLDB lldb lldb-6.0 lldb-5.0 lldb-4.0 lldb-3.9 lldb-3.8 lldb-3.7 lldb-3.6 lldb-3.5 PATHS "${WITH_LLDB_LIBS}" PATH_SUFFIXES llvm NO_DEFAULT_PATH) - find_library(LLDB_LIB NAMES LLDB lldb lldb-6.0 lldb-5.0 lldb-4.0 lldb-3.9 lldb-3.8 lldb-3.7 lldb-3.6 lldb-3.5 PATH_SUFFIXES llvm) + find_library(LLDB_LIB NAMES LLDB lldb lldb-${LLDB_LLVM_VERSION} lldb-6.0 lldb-5.0 lldb-4.0 lldb-3.9 lldb-3.8 lldb-3.7 lldb-3.6 lldb-3.5 PATHS "${WITH_LLDB_LIBS}" PATH_SUFFIXES llvm NO_DEFAULT_PATH) + find_library(LLDB_LIB NAMES LLDB lldb lldb-${LLDB_LLVM_VERSION} lldb-6.0 lldb-5.0 lldb-4.0 lldb-3.9 lldb-3.8 lldb-3.7 lldb-3.6 lldb-3.5 PATH_SUFFIXES llvm) if(LLDB_LIB STREQUAL LLDB_LIB-NOTFOUND) - if(REQUIRE_LLDBPLUGIN) - set(MESSAGE_MODE FATAL_ERROR) - else() - set(MESSAGE_MODE WARNING) - endif() - message(${MESSAGE_MODE} "Cannot find lldb library. Try installing Xcode. You may need to set LLVM_HOME, LLDB_LIB_DIR or LLDB_LIB if the build still can't find it.") - return() + if(REQUIRE_LLDBPLUGIN) + set(MESSAGE_MODE FATAL_ERROR) + else() + set(MESSAGE_MODE WARNING) + endif() + message(${MESSAGE_MODE} "Cannot find lldb library. Try installing Xcode. You may need to set LLVM_HOME, LLDB_LIB_DIR or LLDB_LIB if the build still can't find it.") + return() endif() endif() endif() message(STATUS "LLDB_LIB: ${LLDB_LIB}") -if(NOT $ENV{LLDB_H} STREQUAL "") - set(LLDB_H "$ENV{LLDB_H}") -else() - # Check for LLDB headers - # Multiple versions of LLDB can install side-by-side, so we need to check for lldb in various locations. - # If the file in a directory is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "${WITH_LLDB_INCLUDES}" NO_DEFAULT_PATH) - find_path(LLDB_H "lldb/API/LLDB.h") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-14/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-13/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-12/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-11/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-10/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-9/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-6.0/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-5.0/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-4.0/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.9/include") - #FreeBSD - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm39/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm38/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm12/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm11/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm10/include") - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm90/include") - - if(LLDB_H STREQUAL LLDB_H-NOTFOUND) - if(REQUIRE_LLDBPLUGIN) - set(MESSAGE_MODE FATAL_ERROR) - else() - set(MESSAGE_MODE WARNING) - endif() - message(${MESSAGE_MODE} "Cannot find LLDB.h Try installing lldb-3.9-dev (or the appropriate package for your platform). You may need to set LLVM_HOME or LLDB_INCLUDE_DIR if the build still can't find it.") - return() - endif() -endif() - -message(STATUS "LLDB_H: ${LLDB_H}") - add_compile_options(-Wno-delete-non-virtual-dtor) include_directories(${ROOT_DIR}/src/SOS/inc) From f391d8d45c37dc412cdb1cb3eb4fd92a363f9382 Mon Sep 17 00:00:00 2001 From: Mitchell Hwang <16830051+mdh1418@users.noreply.github.com> Date: Mon, 16 Jun 2025 23:01:39 -0400 Subject: [PATCH 04/26] [ProcessLauncher] Fix Child Proc Arg Validation (#5504) It's stated that none of the `process-id`, `name`, or `diagnostic-port` options should be configured when launching a child process with `dotnet-trace collect ... -- `, yet the check only errors when all are configured. Additionally makes the exclusive check on `process-id`, `name`, `diagnosic-port`, and `dsrouter` more readable. ### Before ``` SUCCESS PS C:\Users\mihw\source\repos\mdh1418\diagnostics\latest> .\artifacts\bin\dotnet-trace\Debug\net8.0\dotnet-trace.exe collect -p 1418 --show-child-io -- dotnet package search json The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a Diagnostic Port. DOTNET_DiagnosticPorts="dotnet-trace-26020-20250616_135956.socket,suspend,connect" DOTNET_DefaultDiagnosticPortSuspend=0 FAIL PS C:\Users\mihw\source\repos\mdh1418\diagnostics\latest> .\artifacts\bin\dotnet-trace\Debug\net8.0\dotnet-trace.exe collect -p 1418 --show-child-io -n mihw --dport whim -- dotnet package search json None of the --name, --process-id, or --diagnostic-port options may be specified when launching a child process. SUCCESS PS C:\Users\mihw\source\repos\mdh1418\diagnostics\latest> .\artifacts\bin\dotnet-trace\Debug\net8.0\dotnet-trace.exe collect -p 1418 --show-child-io -n mihw -- dotnet package search json The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a Diagnostic Port. DOTNET_DiagnosticPorts="dotnet-trace-27244-20250616_140018.socket,suspend,connect" DOTNET_DefaultDiagnosticPortSuspend=0 ``` ### After ``` FAIL PS C:\Users\mihw\source\repos\mdh1418\diagnostics\latest> .\artifacts\bin\dotnet-trace\Debug\net8.0\dotnet-trace.exe collect -p 1418 --show-child-io -- dotnet package search json None of the --name, --process-id, or --diagnostic-port options may be specified when launching a child process. FAIL PS C:\Users\mihw\source\repos\mdh1418\diagnostics\latest> .\artifacts\bin\dotnet-trace\Debug\net8.0\dotnet-trace.exe collect -p 1418 --show-child-io -n mihw --dport whim -- dotnet package search json None of the --name, --process-id, or --diagnostic-port options may be specified when launching a child process. FAIL PS C:\Users\mihw\source\repos\mdh1418\diagnostics\latest> .\artifacts\bin\dotnet-trace\Debug\net8.0\dotnet-trace.exe collect -p 1418 --show-child-io -n mihw -- dotnet package search json None of the --name, --process-id, or --diagnostic-port options may be specified when launching a child process. ``` --- src/Tools/Common/Commands/Utils.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Tools/Common/Commands/Utils.cs b/src/Tools/Common/Commands/Utils.cs index bfe0016c09..eb19d9b0bc 100644 --- a/src/Tools/Common/Commands/Utils.cs +++ b/src/Tools/Common/Commands/Utils.cs @@ -66,7 +66,7 @@ public static int LaunchDSRouterProcess(string dsroutercommand) /// public static bool ValidateArgumentsForChildProcess(int processId, string name, string port) { - if (processId != 0 && name != null && !string.IsNullOrEmpty(port)) + if (processId != 0 || name != null || !string.IsNullOrEmpty(port)) { Console.WriteLine("None of the --name, --process-id, or --diagnostic-port options may be specified when launching a child process."); return false; @@ -99,9 +99,11 @@ public static bool ResolveProcessForAttach(int processId, string name, string po Console.WriteLine($"{processId} is not a valid process ID"); return false; } - else if ( processId != 0 && (!string.IsNullOrEmpty(name) || !string.IsNullOrEmpty(port) || !string.IsNullOrEmpty(dsrouter)) - || !string.IsNullOrEmpty(name) && (!string.IsNullOrEmpty(port) || !string.IsNullOrEmpty(dsrouter)) - || !string.IsNullOrEmpty(port) && !string.IsNullOrEmpty(dsrouter)) + else if ((processId != 0 ? 1 : 0) + + (!string.IsNullOrEmpty(name) ? 1 : 0) + + (!string.IsNullOrEmpty(port) ? 1 : 0) + + (!string.IsNullOrEmpty(dsrouter) ? 1 : 0) + != 1) { Console.WriteLine("Only one of the --name, --process-id, --diagnostic-port, or --dsrouter options may be specified."); return false; From 71de7f1c0174739ac3b0cf4d9e7d5a1c958bf498 Mon Sep 17 00:00:00 2001 From: Mitchell Hwang <16830051+mdh1418@users.noreply.github.com> Date: Tue, 17 Jun 2025 17:17:39 -0400 Subject: [PATCH 05/26] [ProcessLauncher] Explicitly set diagnostic port configs (#5503) Partly addresses https://github.com/dotnet/diagnostics/issues/5501 Child processes started by diagnostic tooling set a `DOTNET_DiagnosticPort` environment variable, specifying only the path. The runtime [defaults to a connect type port in suspend mode](https://github.com/dotnet/runtime/blob/22ccb0563cbb79e950b8d8e2d8bed306b125e7d8/src/native/eventpipe/ds-ipc.c#L628-L637), which isn't clear from the end user's viewpoint, as [logging will only reveal the DiagnosticPort value](https://github.com/dotnet/runtime/blob/22ccb0563cbb79e950b8d8e2d8bed306b125e7d8/src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h#L390-L412). Instead, we can mitigate confusion by explicitly setting the config from the tooling side. ### Before ``` The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a Diagnostic Port. DOTNET_DiagnosticPorts="dotnet-trace-48696-20250614_161420.socket" DOTNET_DefaultDiagnosticPortSuspend=0 ``` ### Now ``` The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a Diagnostic Port. DOTNET_DiagnosticPorts="dotnet-trace-29004-20250616_134924.socket,suspend,connect" DOTNET_DefaultDiagnosticPortSuspend=0 ``` --- src/Tools/Common/ReversedServerHelpers/ReversedServerHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tools/Common/ReversedServerHelpers/ReversedServerHelpers.cs b/src/Tools/Common/ReversedServerHelpers/ReversedServerHelpers.cs index c9135102de..d3ab7a21bc 100644 --- a/src/Tools/Common/ReversedServerHelpers/ReversedServerHelpers.cs +++ b/src/Tools/Common/ReversedServerHelpers/ReversedServerHelpers.cs @@ -95,7 +95,7 @@ public bool Start(string diagnosticTransportName, CancellationToken ct, bool sho _childProc.StartInfo.RedirectStandardOutput = !showChildIO; _childProc.StartInfo.RedirectStandardError = !showChildIO; _childProc.StartInfo.RedirectStandardInput = !showChildIO; - _childProc.StartInfo.Environment.Add("DOTNET_DiagnosticPorts", $"{diagnosticTransportName}"); + _childProc.StartInfo.Environment.Add("DOTNET_DiagnosticPorts", $"{diagnosticTransportName},suspend,connect"); try { if (printLaunchCommand && !showChildIO) From ff0733e1db96306495bd2a5c6d0a6c2e19fb4d8d Mon Sep 17 00:00:00 2001 From: Mitchell Hwang <16830051+mdh1418@users.noreply.github.com> Date: Wed, 18 Jun 2025 15:50:01 -0400 Subject: [PATCH 06/26] [IPC Protocol] Add specification to configure a user_events eventpipe session (#5454) In .NET 10, the EventPipe infrastructure will be leveraged to support [user_events](https://docs.kernel.org/trace/user_events.html). This PR documents the protocol for enabling a user_events-based EventPipe Session through the Diagnostics IPC protocol, where a new EventPipe Command ID `CollectTracing5` will accept necessary tracepoint configuration. As the user_events EventPipe session is not streaming based, the payload is expected to first encode a `uint output_format` to denote the session format (streaming vs user_events). Afterwards, only relevant session configuration options are to be encoded, outlined at the top of the `EventPipe Commands` section in the `Streaming Session` section, `User_events Session` section, and `Session Providers` section. For user_events EventPipe sessions, an additional tracepoint_config is to be encoded, to map Event IDs to tracepoints. This protocol expects the Client to have access to the `user_events_data` file in order to enable configuring a `user_event` EventPipe session, and expects the SCM_RIGHTS to the `user_events_data` file descriptor to be sent in the continuation stream. Additionally, as `user_events` does not support callbacks, a new event_filter config is expected to be encoded in `CollectTracing5`, to act as an allow/deny list of Event IDs that will apply post keyword/level filter. --- documentation/design-docs/ipc-protocol.md | 671 +++++++++++++++++----- 1 file changed, 536 insertions(+), 135 deletions(-) diff --git a/documentation/design-docs/ipc-protocol.md b/documentation/design-docs/ipc-protocol.md index bbff225b54..7e64348d86 100644 --- a/documentation/design-docs/ipc-protocol.md +++ b/documentation/design-docs/ipc-protocol.md @@ -192,95 +192,30 @@ Payloads are either encoded as fixed size structures that can be `memcpy`'ed , _ * `uint` = 4 little endian bytes * `ulong` = 8 little endian bytes * `wchar` = 2 little endian bytes, UTF16 encoding +* `bool` = 1 unsigned byte * `array` = uint length, length # of `T`s * `string` = (`array` where the last `wchar` must = `0`) or (length = `0`) -As an example, the CollectTracing command to EventPipe (explained below) encodes its Payload as: +As an example, the [CollectTracing](#collecttracing) command to EventPipe encodes its Payload as: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + @@ -288,27 +223,27 @@ As an example, the CollectTracing command to EventPipe (explained below) encodes - - + - + + - + - - + - + +
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677781 - 1415 - 1617 - 1819 - 2021 - 2425 - 2829 - 3233 - 4041 - 4445 - 4849 - 7677 - 80
HeaderPayloadPayload
magiccommand reserved circularBufferMBoutputPath LengthoutputPath Stringformat n Providers Keywords logLevel provider_name lengthprovider_name stringprovider_name stringarguments length
"DOTNET_IPC_V1"7880 0x0202 0x0000 25016"/tmp/foo.nettrace"1 1 100 2 14"MyEventSource""MyEventSource"0
@@ -351,6 +286,7 @@ enum class EventPipeCommandId : uint8_t CollectTracing2 = 0x03, // create/start a given session with/without rundown CollectTracing3 = 0x04, // create/start a given session with/without collecting stacks CollectTracing4 = 0x05, // create/start a given session with specific rundown keyword + CollectTracing5 = 0x06, // create/start a given session with/without user_events } ``` See: [EventPipe Commands](#EventPipe-Commands) @@ -359,7 +295,9 @@ See: [EventPipe Commands](#EventPipe-Commands) enum class DumpCommandId : uint8_t { // reserved = 0x00, - CreateCoreDump = 0x01, + GenerateCoreDump = 0x01, + GenerateCoreDump2 = 0x02, + GenerateCoreDump3 = 0x03, // future } ``` @@ -370,6 +308,7 @@ enum class ProfilerCommandId : uint8_t { // reserved = 0x00, AttachProfiler = 0x01, + StartupProfiler = 0x02, // future } ``` @@ -378,14 +317,15 @@ See: [Profiler Commands](#Profiler-Commands) ```c++ enum class ProcessCommandId : uint8_t { - ProcessInfo = 0x00, - ResumeRuntime = 0x01, - ProcessEnvironment = 0x02, - ProcessInfo2 = 0x04, - EnablePerfMap = 0x05, - DisablePerfMap = 0x06, - ApplyStartupHook = 0x07 - ProcessInfo3 = 0x08, + ProcessInfo = 0x00, + ResumeRuntime = 0x01, + ProcessEnvironment = 0x02, + SetEnvironmentVariable = 0x03, + ProcessInfo2 = 0x04, + EnablePerfMap = 0x05, + DisablePerfMap = 0x06, + ApplyStartupHook = 0x07 + ProcessInfo3 = 0x08, // future } ``` @@ -397,6 +337,7 @@ For example, the Command to start a stream session with EventPipe would be `0x02 ## EventPipe Commands +### EventPipe Command IDs ```c++ enum class EventPipeCommandId : uint8_t { @@ -406,6 +347,7 @@ enum class EventPipeCommandId : uint8_t CollectTracing2 = 0x03, // create/start a given session with/without rundown CollectTracing3 = 0x04, // create/start a given session with/without collecting stacks CollectTracing4 = 0x05, // create/start a given session with specific rundown keyword + CollectTracing5 = 0x06, // create/start a given session with/without user_events } ``` EventPipe Payloads are encoded with the following rules: @@ -414,10 +356,50 @@ EventPipe Payloads are encoded with the following rules: * `uint` = 4 little endian bytes * `ulong` = 8 little endian bytes * `wchar` = 2 little endian bytes, UTF16 encoding -* `byte` = 1 unsigned little endian byte +* `byte` = 1 unsigned byte +* `bool` = 1 unsigned byte * `array` = uint length, length # of `T`s * `string` = (`array` where the last `wchar` must = `0`) or (length = `0`) +### `StopTracing` + +Command Code: `0x0201` + +The `StopTracing` command is used to stop a specific EventPipe session. Clients are expected to use this command to stop EventPipe sessions started with [`CollectStreaming`](#CollectStreaming). + +#### Inputs: + +Header: `{ Magic; 28; 0x0201; 0x0000 }` + +Payload: +* `ulong sessionId`: The ID for the EventPipe session to stop + +#### Returns: + +Header: `{ Magic; 28; 0xFF00; 0x0000 }` + +Payload: +* `ulong sessionId`: the ID for the EventPipe session that was stopped + + +##### Details: + +Inputs: +```c +Payload +{ + ulong sessionId +} +``` + +Returns: +```c +Payload +{ + ulong sessionId +} +``` + ### `CollectTracing` Command Code: `0x0202` @@ -432,17 +414,18 @@ If the stream is stopped prematurely due to a client or server error, the `nettr #### Inputs: -Header: `{ Magic; Size; 0x0202; 0x0000 }` +Header: `{ Magic; 20 + Payload Size; 0x0202; 0x0000 }` +Payload: * `uint circularBufferMB`: The size of the circular buffer used for buffering event data while streaming -* `uint format`: 0 for the legacy NetPerf format and 1 for the NetTrace format +* `uint format`: 0 for the legacy NetPerf format and 1 for the NetTrace V4 format * `array providers`: The providers to turn on for the streaming session A `provider_config` is composed of the following data: * `ulong keywords`: The keywords to turn on with this providers * `uint logLevel`: The level of information to turn on * `string provider_name`: The name of the provider -* `string filter_data` (optional): Filter information +* `string arguments`: (Key-value pairs string to pass to the provider) or (length = 0) > see ETW documentation for a more detailed explanation of Keywords, Filters, and Log Level. @@ -469,7 +452,7 @@ provider_config ulong keywords, uint logLevel, string provider_name, - string filter_data (optional) + string arguments } ``` @@ -490,10 +473,10 @@ The `CollectTracing2` command is an extension of the `CollectTracing` command - #### Inputs: -Header: `{ Magic; Size; 0x0203; 0x0000 }` +Header: `{ Magic; 20 + Payload Size; 0x0203; 0x0000 }` * `uint circularBufferMB`: The size of the circular buffer used for buffering event data while streaming -* `uint format`: 0 for the legacy NetPerf format and 1 for the NetTrace format +* `uint format`: 0 for the legacy NetPerf format and 1 for the NetTrace V4 format * `bool requestRundown`: Indicates whether rundown should be fired by the runtime. * `array providers`: The providers to turn on for the streaming session @@ -501,7 +484,7 @@ A `provider_config` is composed of the following data: * `ulong keywords`: The keywords to turn on with this providers * `uint logLevel`: The level of information to turn on * `string provider_name`: The name of the provider -* `string filter_data` (optional): Filter information +* `string arguments`: (Key-value pairs string to pass to the provider) or (length = 0) > see ETW documentation for a more detailed explanation of Keywords, Filters, and Log Level. > @@ -529,7 +512,7 @@ provider_config ulong keywords, uint logLevel, string provider_name, - string filter_data (optional) + string arguments } ``` @@ -550,10 +533,10 @@ The `CollectTracing3` command is an extension of the `CollectTracing2` command - #### Inputs: -Header: `{ Magic; Size; 0x0203; 0x0000 }` +Header: `{ Magic; 20 + Payload Size; 0x0203; 0x0000 }` * `uint circularBufferMB`: The size of the circular buffer used for buffering event data while streaming -* `uint format`: 0 for the legacy NetPerf format and 1 for the NetTrace format +* `uint format`: 0 for the legacy NetPerf format and 1 for the NetTrace V4 format * `bool requestRundown`: Indicates whether rundown should be fired by the runtime. * `bool requestStackwalk`: Indicates whether stacktrace information should be recorded. * `array providers`: The providers to turn on for the streaming session @@ -562,7 +545,7 @@ A `provider_config` is composed of the following data: * `ulong keywords`: The keywords to turn on with this providers * `uint logLevel`: The level of information to turn on * `string provider_name`: The name of the provider -* `string filter_data` (optional): Filter information +* `string arguments`: (Key-value pairs string to pass to the provider) or (length = 0) > see ETW documentation for a more detailed explanation of Keywords, Filters, and Log Level. > @@ -591,7 +574,7 @@ provider_config ulong keywords, uint logLevel, string provider_name, - string filter_data (optional) + string arguments } ``` @@ -608,7 +591,7 @@ Followed by an Optional Continuation of a `nettrace` format stream of events. Command Code: `0x0205` -The `CollectTracing4` command is an extension of the `CollectTracing3` command - its behavior is the same as `CollectTracing3` command, except the requestRundown field is replaced by the rundownKeyword field to allow customizing the set of rundown events to be fired. +The `CollectTracing4` command is an extension of the `CollectTracing3` command - its behavior is the same as `CollectTracing3` command, except the requestRundown field is replaced by the rundownKeyword field to allow customizing the set of rundown events to be fired. A rundown keyword of `0x80020139` has the equivalent behavior as `CollectTracing3` with `requestRundown=true` and rundown keyword of `0` has the equivalent behavior as `requestRundown=false`. @@ -617,18 +600,20 @@ A rundown keyword of `0x80020139` has the equivalent behavior as `CollectTracing #### Inputs: -Header: `{ Magic; Size; 0x0205; 0x0000 }` +Header: `{ Magic; 20 + Payload Size; 0x0205; 0x0000 }` +Payload: * `uint circularBufferMB`: The size of the circular buffer used for buffering event data while streaming -* `uint format`: 0 for the legacy NetPerf format and 1 for the NetTrace format +* `uint format`: 0 for the legacy NetPerf format and 1 for the NetTrace V4 format * `ulong rundownKeyword`: Indicates the keyword for the rundown provider +* `bool requestStackwalk`: Indicates whether stacktrace information should be recorded. * `array providers`: The providers to turn on for the streaming session A `provider_config` is composed of the following data: * `ulong keywords`: The keywords to turn on with this providers * `uint logLevel`: The level of information to turn on * `string provider_name`: The name of the provider -* `string filter_data` (optional): Filter information +* `string arguments`: (Key-value pairs string to pass to the provider) or (length = 0) > see ETW documentation for a more detailed explanation of Keywords, Filters, and Log Level. > @@ -656,7 +641,7 @@ provider_config ulong keywords, uint logLevel, string provider_name, - string filter_data (optional) + string arguments } ``` @@ -669,43 +654,459 @@ Payload ``` Followed by an Optional Continuation of a `nettrace` format stream of events. -### `StopTracing` +### `CollectTracing5` -Command Code: `0x0201` +Command Code: `0x0206` -The `StopTracing` command is used to stop a specific streaming session. Clients are expected to use this command to stop streaming sessions started with [`CollectStreaming`](#CollectStreaming). +The `CollectTracing5` command is an extension of the `CollectTracing4` command. It has all the capabilities of `CollectTracing4` and introduces new fields to enable a Linux-only user_events-based eventpipe session and to prescribe an enable/disable list for Event IDs. When the user_events-based eventpipe session is enabled, the file descriptor and SCM_RIGHTS of the `user_events_data` file must be sent through the optional continuation stream as [described](#passing_file_descriptor). The runtime will register tracepoints based on the provider configurations passed in, and runtime events will be written directly to the `user_events_data` file descriptor. The enable/disable list of Event IDs will apply after the keyword/level filter to determine whether or not that provider's event will be written. + +> Note available for .NET 10.0 and later. #### Inputs: -Header: `{ Magic; 28; 0x0201; 0x0000 }` +Header: `{ Magic; 20 + Payload Size; 0x0206; 0x0000 }` -* `ulong sessionId`: The ID for the streaming session to stop +#### Streaming Session Payload: +* `uint session_type`: 0 +* `uint streaming_circularBufferMB`: Specifies the size of the Streaming session's circular buffer used for buffering event data. +* `uint streaming_format`: 0 for the legacy NetPerf format and 1 for the NetTrace V4 format. Specifies the format in which event data will be serialized into the IPC Stream +* `ulong rundownKeyword`: Indicates the keyword for the rundown provider +* `bool requestStackwalk`: Indicates whether stacktrace information should be recorded. +* `array providers`: The providers to turn on for the session -#### Returns: +The `streaming_provider_config` is composed of the following data: +* `ulong keywords`: The keywords to turn on with this provider +* `uint logLevel`: The level of information to turn on +* `string provider_name`: The name of the provider +* `string arguments`: (Key-value pairs string to pass to the provider) or (length = 0) +* `event_filter filter`: Rules for filtering this provider's Event IDs, applied after `keyword`/`logLevel`, using an enable/disable list or (length = `0`). -Header: `{ Magic; 28; 0xFF00; 0x0000 }` +An `event_filter` is comprised of the following data: +* `bool enable`: 0 to disable events, 1 to enable events +* `array event_ids`: List of Event IDs to disable or enable. + +See [event_filter serialization examples](#event_filter) -* `ulong sessionId`: the ID for the streaming session that was stopped +#### User_events Session Payload: +* `uint session_type`: 1 +* `ulong rundownKeyword`: Indicates the keyword for the rundown provider +* `array providers`: The providers to turn on for the session +The `user_events_provider_config` is composed of the following data: +* `ulong keywords`: The keywords to turn on with this provider +* `uint logLevel`: The level of information to turn on +* `string provider_name`: The name of the provider +* `string arguments`: (Key-value pairs string to pass to the provider) or (length = 0) +* `event_filter filter`: Rules for filtering this provider's Event IDs, applied after `keyword`/`logLevel`, using an enable/disable list or (length = `0`). +* `tracepoint_config config`: Maps Event IDs to tracepoints. If an Event ID is excluded by `event_filter`, it will not be written to any tracepoint. -##### Details: +An `event_filter` is comprised of the following data: +* `bool enable`: 0 to disable events, 1 to enable events +* `array event_ids`: List of Event IDs to disable or enable. -Inputs: -```c -Payload -{ - ulong sessionId -} +See [event_filter serialization examples](#event_filter) + +A `tracepoint_config` is comprised of the following data: +* `string default_tracepoint_name`: (The default tracepoint filtered Event IDs will be written to unless otherwise specified by `tracepoints`) or (length = `0` to only write to tracepoints specified in `tracepoints`) +* `array tracepoints`: Specifies alternate tracepoints for a set of Event IDs to be written to instead of the default tracepoint or (length = `0`). + +A `tracepoint_set` is comprised of the following data: +* `string tracepoint_name`: The tracepoint that the following subset of Event IDs should be written to. +* `array event_ids`: The Event IDs to be written to `tracepoint_name`. + +With a user_events session, atleast one of `default_tracepoint_name` and `tracepoints` must be specified. An error will be returned through the stream if both are length = `0`. +Event IDs specified in `tracepoint_set`s must be exclusive. If an Event ID is detected in different `tracepoint_set`s of the provider, an error will be returned through the stream. + +See [tracepoint_config serialization examples](#tracepoint_config) + +> See ETW documentation for a more detailed explanation of Keywords, Filters, and Log Level. + +#### Returns (as an IPC Message Payload): + +Header: `{ Magic; 28; 0xFF00; 0x0000; }` + +`CollectTracing5` returns: +* `ulong sessionId`: the ID for the EventPipe Session started + +A Streaming Session started with `CollectTracing5` is followed by an Optional Continuation of a `nettrace` format stream of events. + +A User_events Session started with `CollectTracing5` expects the Optional Continuation to contain another message passing along the SCM_RIGHTS `user_events_data` file descriptor. See [details](#passing_file_descriptor) + +## EventPipe Payload Serialization Examples + +### Event_filter +Example `event_filter` serialization. Serializing +``` +enable=0, event_ids=[] +Disable Nothing === Enable all events. +``` + + + + + + + + + + + + + + + + + + + +
12-5
boolarray<uint>
enableevent_ids
00
+ +``` +enable=0, event_ids=[4, 5] +Disable only Event IDs 4 and 5 === Enable all Event IDs except 4 and 5 ``` -Returns: -```c -Payload -{ - ulong sessionId -} + + + + + + + + + + + + + + + + + + + + + +
12610-13
boolarray<uint>
enableevent_ids
0245
+ +``` +enable=1, event_ids=[] +Enable Nothing === Disable all events. ``` + + + + + + + + + + + + + + + + + + + +
12-5
boolarray<uint>
enableevent_ids
10
+ +``` +enable=1, event_ids=[1, 2, 3] +Enable only EventIDs 1, 2, and 3 === Disable all EventIDs except 1, 2, and 3. +``` + + + + + + + + + + + + + + + + + + + + + + + + + + +
1261014-17
boolarray<uint>
enableevent_ids
13123
+ +### Tracepoint_config +Example `tracepoint_config` serialization +``` +session_type=0, Streaming Sessions DO NOT encode bytes for tracepoint_config +session_type=1, encode bytes for tracepoint_config +``` + +``` +All enabled Event IDs will be written to a default "MyTracepoint" tracepoint +``` + + + + + + + + + + + + + + + + + + + + +
1533-36
string (array<wchar>)array<uint>
default_tracepoint_nametracepoints
14"MyTracepoint"0
+ +``` +Enabled Event IDs 1 - 9 will be written to tracepoint "LowEvents". +All other enabled Event IDs will be written to "MyTracepoint" +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1533374161656973778185899397-100
string (array<wchar>)uintstring (array<wchar>)array<uint>
default_tracepoint_nametracepointstracepoint_nameevent_ids
14"MyTracepoint"110"LowEvents"9123456789
+ +``` +Enabled Event IDs 1 - 9 will be written to tracepoint "LowEvents". +No default tracepoint needed, don't write any other enabled Event IDs +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1591333374145495357616569-72
string (array<wchar>)uintstring (array<wchar>)array<uint>
default_tracepoint_nametracepointstracepoint_nameevent_ids
0110"LowEvents"9123456789
+ +### passing_file_descriptor + +> Note: This only applies to enabling an user_event-based EventPipe session, which is specifically a Linux feature + +To register [user_event](https://docs.kernel.org/trace/user_events.html) tracepoints and write events, access to the root protected `user_events_data` file is required. Once the .NET Runtime's Diagnostic Server processes a [CollectTracing5](#collecttracing5) command specifying the `user_events` format (`session_type=1`), it expects that the client will send a file descriptor to the [continuation stream](#general-flow) via SCM_RIGHTS. + +```C +#include +#include + +struct msghdr { + void * msg_name; /* ignored by runtime */ + unsigned int msg_namelen; /* ignored by runtime */ + struct iovec * msg_iov; /* runtime will "parse" 1 byte */ + unsigned int msg_iovlen; /* runtime will "parse" one msg_iov */ + void * msg_control; /* ancillary data */ + unsigned int msg_controllen; /* ancillary data buffer len */ + int msg_flags; /* ignored by runtime */ +}; + +struct cmsghdr { + unsigned int cmsg_len; /* length of control message */ + int cmsg_level; /* SOL_SOCKET */ + int cmsg_type; /* SCM_RIGHTS */ + int cmsg_data[0]; /* file descriptor */ +}; +``` + +For parsing the file descriptor passed with SCM_RIGHTS, the runtime will `recvmsg` the message and only care about the control message containing ancillary data. It will read one byte from the `msg_iov` buffer just to receive the ancillary data, but it will disregard the contents of the `msg_iov` buffers. + +### User_events format + +#### User_events Registration + +Once the runtime has received the configured tracepoint names as detailed under [tracepoint_config](#user_events-session-payload), it uses the [file descriptor passed in the continuation stream](#passing_file_descriptor) to register the prescribed tracepoint names following the [user_events registering protocol](https://docs.kernel.org/trace/user_events.html#registering). The runtime will construct a `user_reg` struct for every tracepoint name, defaulting to using none of the `user_reg` flags, so the resulting command format will be as follows: + +##### Tracepoint Format V1 + +` u8 version; u16 event_id; __rel_loc u8[] extension; __rel_loc u8[] payload` + +See [user_events writing](#user_events-writing) below for field details`. + +#### User_events Writing + +When writing events to their mapped user_events tracepoints prescribed by the `tracepoint_config` in the [User_events session payload](#user_events-session-payload), the runtime will adapt the [user_events writing protocol](https://docs.kernel.org/trace/user_events.html#writing-data) to write the event as: + +``` +struct iovec io[7]; + +io[0].iov_base = &write_index; // __u32 tracepoint write index from registration +io[0].iov_len = sizeof(write_index); +io[1].iov_base = &version; // __u8 tracepoint format version +io[1].iov_len = sizeof(version); +io[2].iov_base = &event_id; // __u16 EventID defined by EventSource/native manifest +io[2].iov_len = sizeof(event_id); +io[3].iov_base = &extension; // __rel_loc u8[] optional event information +io[3].iov_base = sizeof(extension); +io[4].iov_base = &payload; // __rel_loc u8[] event payload +io[4].iov_len = sizeof(payload); +io[6].iov_base = &data; // __u8[] data +io[6].iov_len = data_len; + +writev(ep_session->data_fd, (const struct iovec *)io, 7); +``` + +The `__rel_loc` is the relative dynamic array attribute described [here](https://lwn.net/Articles/876682/). + +The `write_index` is the tracepoint's write index determined during tracepoint registration. + +The `version` is the version of the tracepoint format, which in this case is [version 1](#tracepoint-format-v1). + +The `event_id` is the ID of the event, defined by the EventSource/native manifest. + +#### Extension Blob Format + +The `extension` field is an optional data blob that can provide additional information about an event. Its structure is as follows: + +1. **Label** (`byte`): Indicates the type of data that follows. +2. **Data**: The content, whose format depends on the label. + +**Label Values and Corresponding Data:** + +| Label | Meaning | Data Format | Description | +|--------|------------------------|----------------------------|-----------------------------------------------------------------------------| +| 0x01 | Event Metadata | `array metadata` | Contains event metadata, formatted per NetTrace v5. | +| 0x02 | ActivityId | `uint16 guid` | Contains the GUID for the ActivityId. | +| 0x03 | RelatedActivityId | `uint16 guid` | Contains the GUID for the RelatedActivityId. | + +**Details:** +- The extension blob may be empty if no extra information is present. +- Multiple extension blobs can be concatenated if more than one piece of information is needed. Each blob starts with its own label byte. +- For Event Metadata (`0x01`), the `metadata` array matches the NetTrace v5 PayloadBytes format. +- For ActivityId and RelatedActivityId (`0x02`, `0x03`), the `guid` is a 16-byte value representing the GUID. +- The size of the entire extension blob can be inferred from the extension `__rel_loc` field. See the [__rel_loc documentation](https://lwn.net/Articles/876682/) for more details. + +**Example Layout:** + +``` +[Label][Data][Label][Data]... +``` + +For example, an extension blob containing both Event Metadata and ActivityId would look like: +- `[0x01][metadata][0x02][guid]` + +**Notes:** +- The runtime includes Event Metadata only the first time an event is sent in a session. +- Native runtime events do not include metadata. + +The `payload` points at a blob of data with the same format as an EventPipe payload – the concatenated encoded values for all the parameters. + +The `metadata` either points at nothing if the event doesn’t have metadata, or it points at a metadata blob matching the NetTrace version 5 formatting convention. Specifically it is the data that would be stored inside the PayloadBytes area of an event blob within a MetadataBlock described [here](https://github.com/microsoft/perfview/blob/main/src/TraceEvent/EventPipe/NetTraceFormat_v5.md#metadata-event-encoding). + +> NOTE: V5 and V6 metadata formats have the same info, but they aren’t formatted identically. Parsing and reserialization is required to convert between the two. + +### Which events have metadata? + +The runtime will keep track per-session whether it has sent a particular event before. The first time each event is sent during a session, metadata will be included, and otherwise, it will be left empty. As a special case, runtime events currently implemented in native code will never send metadata. + ## Dump Commands ### `CreateCoreDump` From 7b932859c9c26f85d58351f5eb86ed116087c216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Thu, 19 Jun 2025 01:31:00 +0200 Subject: [PATCH 07/26] Make dotnet-gcdump work with native AOT (#5506) Pretty much just adjusts what we had for Project N: * `IsProjectN` is not true for native AOT because we use the same provider GUID as JIT-based CoreCLR and not Project N (which is by design) * It is still possible to handle both Project N and native AOT the same way where it matters because both Project N and native AOT emit the same flags (`TypeFlags.ModuleBaseAddress` and `ModuleFlags.Native`) * Looks like Project N GCDump always relied on Windows kernel module load data only. I'm adding a path that can also use our own module load events (Project N also generates those) Cc @dotnet/ilc-contrib --- .../DotNetHeapDumpGraphReader.cs | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/Tools/dotnet-gcdump/DotNetHeapDump/DotNetHeapDumpGraphReader.cs b/src/Tools/dotnet-gcdump/DotNetHeapDump/DotNetHeapDumpGraphReader.cs index 6b13cc5219..7bdb258be4 100644 --- a/src/Tools/dotnet-gcdump/DotNetHeapDump/DotNetHeapDumpGraphReader.cs +++ b/src/Tools/dotnet-gcdump/DotNetHeapDump/DotNetHeapDumpGraphReader.cs @@ -118,12 +118,29 @@ internal void SetupCallbacks(MemoryGraph memoryGraph, TraceEventDispatcher sourc } ulong moduleID = unchecked((ulong)data.ModuleID); - if (!m_moduleID2Name.ContainsKey(moduleID)) + if ((data.ModuleFlags & ModuleFlags.Native) != 0) { - m_moduleID2Name[moduleID] = data.ModuleILPath; + if (!m_modules.ContainsKey(moduleID)) + { + Module module = new(moduleID); + module.Path = data.ModuleNativePath; + module.PdbGuid = data.NativePdbSignature; + module.PdbAge = data.NativePdbAge; + module.PdbName = data.NativePdbBuildPath; + m_modules[module.ImageBase] = module; + } + + m_log.WriteLine("Found Native Module {0} ID 0x{1:x}", data.ModuleNativePath, moduleID); } + else + { + if (!m_moduleID2Name.ContainsKey(moduleID)) + { + m_moduleID2Name[moduleID] = data.ModuleILPath; + } - m_log.WriteLine("Found Module {0} ID 0x{1:x}", data.ModuleILFileName, moduleID); + m_log.WriteLine("Found Module {0} ID 0x{1:x}", data.ModuleILFileName, moduleID); + } }; source.Clr.AddCallbackForEvents(moduleCallback); // Get module events for clr provider // TODO should not be needed if we use CAPTURE_STATE when collecting. @@ -542,12 +559,11 @@ internal unsafe void ConvertHeapDataToGraph() { GCBulkTypeValues typeData = data.Values(i); string typeName = typeData.TypeName; - if (IsProjectN) + if ((typeData.Flags & TypeFlags.ModuleBaseAddress) != 0) { - // For project N we only log the type ID and module base address. + // For native modules we only log the type ID and module base address. Debug.Assert(typeName.Length == 0); - Debug.Assert((typeData.Flags & TypeFlags.ModuleBaseAddress) != 0); - ulong moduleBaseAddress = typeData.TypeID - (ulong)typeData.TypeNameID; // Tricky way of getting the image base. + ulong moduleBaseAddress = typeData.ModuleID; Debug.Assert((moduleBaseAddress & 0xFFFF) == 0); // Image loads should be on 64K boundaries. Module module = GetModuleForImageBase(moduleBaseAddress); @@ -855,7 +871,7 @@ private NodeTypeIndex GetTypeIndex(ulong typeID, int objSize) // TODO FIX NOW worry about module collision if (!m_arrayNametoIndex.TryGetValue(typeName, out ret)) { - if (IsProjectN) + if (m_graph.HasDeferedTypeNames) { ret = m_graph.CreateType(type.RawTypeID, type.Module, objSize, suffix); } From c1781de47e227e0300c39f3cdcc6671f91b03bcb Mon Sep 17 00:00:00 2001 From: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com> Date: Wed, 18 Jun 2025 16:35:39 -0700 Subject: [PATCH 08/26] Update VS detection logic (#5507) --- eng/Build-Native.cmd | 47 ++++++++++++------------------ eng/native/configurecompiler.cmake | 22 +++++++------- eng/native/gen-buildsys.cmd | 30 ++++++++++++++++++- eng/native/init-vs-env.cmd | 6 +--- 4 files changed, 58 insertions(+), 47 deletions(-) diff --git a/eng/Build-Native.cmd b/eng/Build-Native.cmd index 28f101cf53..b68feb691d 100644 --- a/eng/Build-Native.cmd +++ b/eng/Build-Native.cmd @@ -9,24 +9,6 @@ echo %__MsgPrefix%Starting Build at %TIME% set __ThisScriptFull="%~f0" set __ThisScriptDir="%~dp0" -call "%__ThisScriptDir%"\native\init-vs-env.cmd -if NOT '%ERRORLEVEL%' == '0' goto ExitWithError - -if defined VS170COMNTOOLS ( - set "__VSToolsRoot=%VS170COMNTOOLS%" - set "__VCToolsRoot=%VS170COMNTOOLS%\..\..\VC\Auxiliary\Build" - set __VSVersion=vs2022 -) -if defined VS160COMNTOOLS ( - set "__VSToolsRoot=%VS160COMNTOOLS%" - set "__VCToolsRoot=%VS160COMNTOOLS%\..\..\VC\Auxiliary\Build" - set __VSVersion=vs2019 -) else if defined VS150COMNTOOLS ( - set "__VSToolsRoot=%VS150COMNTOOLS%" - set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build" - set __VSVersion=vs2017 -) - :: Set the default arguments for build set __TargetArch=x64 @@ -42,11 +24,11 @@ set __Verbosity=minimal set __Ninja=0 :: Set the various build properties here so that CMake and MSBuild can pick them up -set "__ProjectDir=%~dp0" -:: remove trailing slash -if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%" -set "__ProjectDir=%__ProjectDir%\.." -set "__SourceDir=%__ProjectDir%\src" +set "__RepoRootDir=%~dp0" +:: remove trailing slash +if %__RepoRootDir:~-1%==\ set "__RepoRootDir=%__RepoRootDir:~0,-1%" +set "__RepoRootDir=%__RepoRootDir%\.." +set "__SourceDir=%__RepoRootDir%\src" :: __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:OfficialBuildId=xxxxxx) set "__args=%*" @@ -89,13 +71,20 @@ if [!processedArgs!] == [] ( :ArgsDone +call "%__RepoRootDir%"\eng\native\init-vs-env.cmd +if NOT '%ERRORLEVEL%' == '0' goto ExitWithError + +if defined VCINSTALLDIR ( + set "__VCToolsRoot=%VCINSTALLDIR%Auxiliary\Build" +) + if "%__HostArch%" == "" set __HostArch=%__TargetArch% if /i "%__BuildType%" == "debug" set __BuildType=Debug if /i "%__BuildType%" == "release" set __BuildType=Release if "%NUGET_PACKAGES%" == "" ( if %__CI% EQU 1 ( - set "NUGET_PACKAGES=%__ProjectDir%\.packages" + set "NUGET_PACKAGES=%__RepoRootDir%\.packages" ) else ( set "NUGET_PACKAGES=%UserProfile%\.nuget\packages" ) @@ -104,7 +93,7 @@ if "%NUGET_PACKAGES%" == "" ( echo %NUGET_PACKAGES% :: Set the remaining variables based upon the determined build configuration -set "__RootBinDir=%__ProjectDir%\artifacts" +set "__RootBinDir=%__RepoRootDir%\artifacts" set "__BinDir=%__RootBinDir%\bin\%__TargetOS%.%__TargetArch%.%__BuildType%" set "__LogDir=%__RootBinDir%\log\%__TargetOS%.%__TargetArch%.%__BuildType%" set "__ArtifactsIntermediatesDir=%__RootBinDir%\obj" @@ -128,7 +117,7 @@ echo %__MsgPrefix%Commencing diagnostics repo build echo %__MsgPrefix%Checking prerequisites :: Eval the output from probe-win1.ps1 -for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__ProjectDir%\eng\native\set-cmake-path.ps1"""') do %%a +for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__RepoRootDir%\eng\native\set-cmake-path.ps1"""') do %%a REM ========================================================================================= REM === @@ -139,7 +128,7 @@ REM ============================================================================ @if defined _echo @echo on :: Parse the optdata package versions out of msbuild so that we can pass them on to CMake -set __DotNetCli=%__ProjectDir%\dotnet.cmd +set __DotNetCli=%__RepoRootDir%\dotnet.cmd REM ========================================================================================= REM === @@ -179,7 +168,7 @@ if %__BuildNative% EQU 1 ( echo Generating Version Header set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog" - powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\native-prereqs.proj" /bl:!__GenerateVersionLog! /t:BuildPrereqs /restore %__CommonBuildArgs% + powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" "%__RepoRootDir%\eng\native-prereqs.proj" /bl:!__GenerateVersionLog! /t:BuildPrereqs /restore %__CommonBuildArgs% if not !errorlevel! == 0 ( echo Generate Version Header FAILED goto ExitWithError @@ -193,7 +182,7 @@ if %__BuildNative% EQU 1 ( set __ExtraCmakeArgs=!__ExtraCmakeArgs! "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__TargetArch%" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%" pushd "%__IntermediatesDir%" - call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__HostArch% %__TargetOS% !__ExtraCmakeArgs! + call "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__RepoRootDir%" "%__IntermediatesDir%" %VisualStudioVersion% %__HostArch% %__TargetOS% !__ExtraCmakeArgs! @if defined _echo @echo on popd diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index 35367f9605..6b7cd6b2cb 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -19,9 +19,7 @@ set(CMAKE_TRY_COMPILE_CONFIGURATION Release) include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) -if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.18") - include(CheckLinkerFlag) -endif() +include(CheckLinkerFlag) # "configureoptimization.cmake" must be included after CLR_CMAKE_HOST_UNIX has been set. include(${CMAKE_CURRENT_LIST_DIR}/configureoptimization.cmake) @@ -672,22 +670,22 @@ if (CLR_CMAKE_HOST_UNIX) set(DISABLE_OVERRIDING_MIN_VERSION_ERROR -Wno-overriding-t-option) add_link_options(-Wno-overriding-t-option) if(CLR_CMAKE_HOST_ARCH_ARM64) - set(CLR_CMAKE_MACCATALYST_COMPILER_TARGET "arm64-apple-ios15.0-macabi") - add_link_options(-target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET}) + set(MACOS_VERSION_MIN_FLAGS "-target arm64-apple-ios15.0-macabi") + add_link_options(-target arm64-apple-ios15.0-macabi) elseif(CLR_CMAKE_HOST_ARCH_AMD64) - set(CLR_CMAKE_MACCATALYST_COMPILER_TARGET "x86_64-apple-ios15.0-macabi") - add_link_options(-target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET}) + set(MACOS_VERSION_MIN_FLAGS "-target x86_64-apple-ios15.0-macabi") + add_link_options(-target x86_64-apple-ios15.0-macabi) else() clr_unknown_arch() endif() # These options are intentionally set using the CMAKE_XXX_FLAGS instead of # add_compile_options so that they take effect on the configuration functions # in various configure.cmake files. - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") - set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") - set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS}-target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") - set(CMAKE_OBJCXX_FLAGS "${CMAKE_OBJCXX_FLAGS} -target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") + set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") + set(CMAKE_OBJCXX_FLAGS "${CMAKE_OBJCXX_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}") elseif(CLR_CMAKE_HOST_OSX) set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0") if(CLR_CMAKE_HOST_ARCH_ARM64) diff --git a/eng/native/gen-buildsys.cmd b/eng/native/gen-buildsys.cmd index 83682d69cf..3a6e1b5426 100644 --- a/eng/native/gen-buildsys.cmd +++ b/eng/native/gen-buildsys.cmd @@ -26,7 +26,7 @@ if /i "%__Ninja%" == "1" ( set __CmakeGenerator=Ninja ) else ( if /i NOT "%__Arch%" == "wasm" ( - if /i "%__VSVersion%" == "vs2022" (set __CmakeGenerator=%__CmakeGenerator% 17 2022) + if /i "%__VSVersion%" == "17.0" (set __CmakeGenerator=%__CmakeGenerator% 17 2022) if /i "%__Arch%" == "x64" (set __ExtraCmakeParams=%__ExtraCmakeParams% -A x64) if /i "%__Arch%" == "arm" (set __ExtraCmakeParams=%__ExtraCmakeParams% -A ARM) @@ -80,6 +80,33 @@ if /i "%__Arch%" == "wasm" ( set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCMAKE_SYSTEM_VERSION=10.0" ) +if /i "%__Os%" == "android" ( + :: Keep in sync with $(AndroidApiLevelMin) in Directory.Build.props in the repository rooot + set __ANDROID_API_LEVEL=21 + if "%ANDROID_NDK_ROOT%" == "" ( + echo Error: You need to set the ANDROID_NDK_ROOT environment variable pointing to the Android NDK root. + exit /B 1 + ) + + set __ExtraCmakeParams=!__ExtraCmakeParams! "-DANDROID_BUILD=1" "-DANDROID_CPP_FEATURES='no-rtti exceptions'" + set __ExtraCmakeParams=!__ExtraCmakeParams! "-DANDROID_PLATFORM=android-!__ANDROID_API_LEVEL!" "-DANDROID_NATIVE_API_LEVEL=!__ANDROID_API_LEVEL!" + + if "%__Arch%" == "x64" ( + set __ExtraCmakeParams=!__ExtraCmakeParams! "-DANDROID_ABI=x86_64" + ) + if "%__Arch%" == "x86" ( + set __ExtraCmakeParams=!__ExtraCmakeParams! "-DANDROID_ABI=x86" + ) + if "%__Arch%" == "arm64" ( + set __ExtraCmakeParams=!__ExtraCmakeParams! "-DANDROID_ABI=arm64-v8a" + ) + if "%__Arch%" == "arm" ( + set __ExtraCmakeParams=!__ExtraCmakeParams! "-DANDROID_ABI=armeabi-v7a" + ) + + set __ExtraCmakeParams=!__ExtraCmakeParams! "-DCMAKE_TOOLCHAIN_FILE='%ANDROID_NDK_ROOT:\=/%/build/cmake/android.toolchain.cmake'" "-C %__repoRoot%/eng/native/tryrun.cmake" +) + :loop if [%6] == [] goto end_loop set __ExtraCmakeParams=%__ExtraCmakeParams% %6 @@ -111,6 +138,7 @@ if not "%__ConfigureOnly%" == "1" ( if /i "%__UseEmcmake%" == "1" ( call "!EMSDK_PATH!/emsdk_env.cmd" > nul 2>&1 && emcmake "%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir% ) else ( + echo "%CMakePath% %__ExtraCmakeParams% --no-warn-unused-cli -G %__CmakeGenerator% -B %__IntermediatesDir% -S %__SourceDir%" "%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir% ) diff --git a/eng/native/init-vs-env.cmd b/eng/native/init-vs-env.cmd index 0d28cac989..6f417fc23f 100644 --- a/eng/native/init-vs-env.cmd +++ b/eng/native/init-vs-env.cmd @@ -53,11 +53,7 @@ set "__VSCOMNTOOLS=" set "VSCMD_START_DIR=" :VSDetected -if "%VisualStudioVersion%"=="17.0" ( - set __VSVersion=vs2022 - set __PlatformToolset=v143 - goto :SetVCEnvironment -) +goto :SetVCEnvironment :VSMissing echo %__MsgPrefix%Error: Visual Studio 2022 with C++ tools required. ^ From c80de30e0d582df0c6fb9b24e8b10c3a78c97161 Mon Sep 17 00:00:00 2001 From: Max Charlamb <44248479+max-charlamb@users.noreply.github.com> Date: Wed, 18 Jun 2025 17:38:50 -0700 Subject: [PATCH 09/26] Sync gcinfo.h with changes made for cDAC in runtime (#5505) Sync changes made for https://github.com/dotnet/runtime/pull/116072 over to diagnostics repo --- src/shared/inc/gcinfo.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/shared/inc/gcinfo.h b/src/shared/inc/gcinfo.h index cdcbb9eb14..cf4a43334b 100644 --- a/src/shared/inc/gcinfo.h +++ b/src/shared/inc/gcinfo.h @@ -77,13 +77,15 @@ struct GCInfoToken } #endif + // Keep this in sync with GetR2RGCInfoVersion in cDac (ExecutionManagerCore.ReadyToRunJitManager.cs) static uint32_t ReadyToRunVersionToGcInfoVersion(uint32_t readyToRunMajorVersion, uint32_t readyToRunMinorVersion) { -#ifdef SOS_INCLUDE - return GCInfoVersion(); -#else - return GCINFO_VERSION; -#endif + if (readyToRunMajorVersion >= 11) + return 4; + + // Since v2 and v3 had the same file format and v1 is no longer supported, + // we can assume GCInfo v3. + return 3; } }; From 44525ccd55c29252900c7a5b3dc3f7d12fbe75c2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 13:54:26 -0400 Subject: [PATCH 10/26] [main] Source code updates from dotnet/dotnet (#5492) > [!NOTE] > This is a codeflow update. It may contain both source code changes from [the VMR](https://github.com/dotnet/dotnet) as well as dependency updates. Learn more [here](https://github.com/dotnet/arcade/blob/main/Documentation/UnifiedBuild/Codeflow-PRs.md). This pull request brings the following source code changes [marker]: <> (Begin:7e2c91d5-dafe-449a-9d20-a3d5aa478584) ## From https://github.com/dotnet/dotnet - **Subscription**: [7e2c91d5-dafe-449a-9d20-a3d5aa478584](https://maestro.dot.net/subscriptions?search=7e2c91d5-dafe-449a-9d20-a3d5aa478584) - **Build**: [20250625.6](https://dev.azure.com/dnceng/internal/_build/results?buildId=2737447) - **Date Produced**: June 25, 2025 11:39:24 PM UTC - **Commit**: [7cd445ec6160e1edbe0c96caa5aa395822403d7f](https://github.com/dotnet/dotnet/commit/7cd445ec6160e1edbe0c96caa5aa395822403d7f) - **Commit Diff**: [f5705c8...7cd445e](https://github.com/dotnet/dotnet/compare/f5705c8f4c5079bba77bae8698ba1583bde0388c...7cd445ec6160e1edbe0c96caa5aa395822403d7f) - **Branch**: main **Updated Dependencies** - **Microsoft.DotNet.Arcade.Sdk**: [from 10.0.0-beta.25318.104 to 10.0.0-beta.25325.106][6] - **Microsoft.DotNet.CodeAnalysis**: [from 10.0.0-beta.25318.104 to 10.0.0-beta.25325.106][6] - **Microsoft.NET.Sdk**: [from 10.0.100-preview.7.25318.104 to 10.0.100-preview.7.25325.106][6] - **Microsoft.AspNetCore.App.Ref.Internal**: [from 10.0.0-preview.7.25318.104 to 10.0.0-preview.7.25325.106][6] - **Microsoft.AspNetCore.App.Ref**: [from 10.0.0-preview.7.25318.104 to 10.0.0-preview.7.25325.106][6] - **Microsoft.NETCore.App.Ref**: [from 10.0.0-preview.7.25318.104 to 10.0.0-preview.7.25325.106][6] - **Microsoft.NETCore.Platforms**: [from 10.0.0-preview.7.25318.104 to 10.0.0-preview.7.25325.106][6] - **Microsoft.CodeAnalysis**: [from 5.0.0-1.25318.104 to 5.0.0-1.25325.106][6] - **Microsoft.CodeAnalysis.CSharp**: [from 5.0.0-1.25318.104 to 5.0.0-1.25325.106][6] - **Microsoft.CodeAnalysis.Analyzers**: [from 5.0.0-1.25318.104 to 5.0.0-1.25325.106][6] - **Microsoft.CodeAnalysis.NetAnalyzers**: [from 10.0.0-preview.25318.104 to 10.0.0-preview.25325.106][6] [marker]: <> (End:7e2c91d5-dafe-449a-9d20-a3d5aa478584) [1]: https://github.com/dotnet/dotnet/compare/f5705c8f4c...57b0396ae0 [1]: https://github.com/dotnet/dotnet/compare/57b0396ae0...0a01b394b1 [1]: https://github.com/dotnet/dotnet/compare/0a01b394b1...1b5819797c [1]: https://github.com/dotnet/dotnet/compare/1b5819797c...804112038c [1]: https://github.com/dotnet/dotnet/compare/804112038c...7de287dade [1]: https://github.com/dotnet/dotnet/compare/7de287dade...d2434b1b5e [1]: https://github.com/dotnet/dotnet/compare/d2434b1b5e...ac2aaf24d1 [1]: https://github.com/dotnet/dotnet/compare/ac2aaf24d1...62e9d324a3 [1]: https://github.com/dotnet/dotnet/compare/62e9d324a3...7e27ec4c31 [1]: https://github.com/dotnet/dotnet/compare/7e27ec4c31...9a90ec1b43 [1]: https://github.com/dotnet/dotnet/compare/9a90ec1b43...604a6612d1 [1]: https://github.com/dotnet/dotnet/compare/604a6612d1...20fdc50b34 [1]: https://github.com/dotnet/dotnet/compare/20fdc50b34...25bec1af21 [1]: https://github.com/dotnet/dotnet/compare/25bec1af21...04b9001ab9 [1]: https://github.com/dotnet/dotnet/compare/04b9001ab9...005f36cd19 [1]: https://github.com/dotnet/dotnet/compare/005f36cd19...be8cb623e0 [1]: https://github.com/dotnet/dotnet/compare/be8cb623e0...20343176cf [1]: https://github.com/dotnet/dotnet/compare/20343176cf...5b76056944 [1]: https://github.com/dotnet/dotnet/compare/5b76056944...9bcfe617e4 [1]: https://github.com/dotnet/dotnet/compare/9bcfe617e4...10060d128e [2]: https://github.com/dotnet/dotnet/compare/9bcfe617e4...105f937bec [3]: https://github.com/dotnet/dotnet/compare/9bcfe617e4...67889d9d2f [4]: https://github.com/dotnet/dotnet/compare/9bcfe617e4...0b99617c5b [5]: https://github.com/dotnet/dotnet/compare/9bcfe617e4...0785dfdb94 [6]: https://github.com/dotnet/dotnet/compare/9bcfe617e4...7cd445ec61 [marker]: <> (Start:Footer:CodeFlow PR) ## Associated changes in source repos - https://github.com/dotnet/arcade/compare/12d3a9f5d6138e22270694574e73e4c58a815795...5fe468883c4a203f57a1b163167e61a24748625a - https://github.com/dotnet/aspnetcore/compare/6ab9fa6377722385cfa907ad4b2cf29cf97671db...f2353d2504c8c575bc0df9a5c8490aa5e2526e62 - https://github.com/dotnet/cecil/compare/50f19ccf4b834a6eab54496486a114ba3839f7b9...48fe72b0bcb273476e3f480bb61f42c5dd295131 - https://github.com/dotnet/command-line-api/compare/77b277a9dc0981b2bbeaebb3cb17baded0c8cc51...68b6dad50acc558276958b19b4c9189d70721d76 - https://github.com/dotnet/deployment-tools/compare/24142f7e09afd44317f70ae94801bc6feca0abcc...ea2bdda50b4e66d7e7d877b37eeea5974693c6a1 - https://github.com/dotnet/efcore/compare/d56b28449d62dba5d3bd4aa0a5a2de17c5fe7d13...d2e60e7fdb8676964c56115e53449564a256632b - https://github.com/dotnet/emsdk/compare/e59e3736babe2262c0dc49d22f70080bec7f513a...d7f601751622ebee331367f19b4310eaa9b70102 - https://github.com/dotnet/fsharp/compare/13ad6469b0354735c5b259f7e8307648ab7a6c50...44a24dcd6677639f3b62e361d99f6495175dc49f - https://github.com/dotnet/msbuild/compare/4ad462496537cd497f9c43531acb21f44d58cd67...21e814e9460cc3323848c1132eca4e72cf051a5f - https://github.com/nuget/nuget.client/compare/58c248e36695c9586c486e8876a43046e0817d41...772ee13d2bafaa1414d90dbfbd77e0941115ef19 - https://github.com/dotnet/razor/compare/4c1a866ce88ca0841aed194d7784b0d08ce8b95f...c60ff6979c94e41675d9f092e2e9161ef2e41493 - https://github.com/dotnet/roslyn/compare/533fde8c7c7b194b1a6e04f87c5ad8090cbafec6...d92a029dfde276aa7cb9a576c351d29d43c4c320 - https://github.com/dotnet/roslyn-analyzers/compare/ffec55d839307816eddf45c9441528c2607417c9...aabbaa2c6459fd586ad4258c8bd6059dac8ba4e6 - https://github.com/dotnet/runtime/compare/1548409aedce8dafcd87f962b3cef437528d108c...53924485e03b81f0ae87651e19b89d2a71c136fe - https://github.com/dotnet/scenario-tests/compare/ba23e62da145ef04187aabe1e1fb64029fe2317d...6ab0ec29e4e346465c767a6e04c37b179ee287f8 - https://github.com/dotnet/sdk/compare/d9960a9c14c4238e92b2eb5bdce20b38ad4ddc4f...0e9898bbc2834154ba0afdfb8372acd02d39ef01 - https://github.com/dotnet/source-build-externals/compare/6dcbf9fa4738db1087b3e6b87b72709e1c7bfc72...c4bd26056e83fcccbe76e4e2fd3aa257d7747c4c - https://github.com/dotnet/source-build-reference-packages/compare/535899fc5acaacbb54b5e49014d157cf8ac995d4...31f60141b67dc390bbcc1e3251c63d240379a0be - https://github.com/dotnet/sourcelink/compare/3ef121ba5d8c5ac89f34b1cfe257140dcf10e61d...634059dd61cb2de8a5fbed786093790a78ce0de7 - https://github.com/dotnet/symreader/compare/d38d92c12935201bb8852096935c267d53592ad9...66c6797a1e9a9346d5f6de3f9edaecad6e4350d0 - https://github.com/dotnet/templating/compare/55fbdd9ae4544393dc54c9aa8bdc0041c78e632e...47d652fd0d57f213226c192f551be66bd5955915 - https://github.com/microsoft/vstest/compare/e894393f92f748898e4e1ef7608892cb16e00163...cdcfb7f5c163d7b7a555b129522c3b868f73e92c - https://github.com/dotnet/windowsdesktop/compare/b186f1017aab5cc07858d180378a854f19c6854d...37ba7be40a4af897f1d390d44fc416000c31ed24 - https://github.com/dotnet/winforms/compare/8376cfcb89e440f652ec2278297ba42a6ff73437...ee675d36d37a4a11947b47e1a2e0722c94b6337b - https://github.com/dotnet/wpf/compare/e72585bbad37ee89c620788a8c5e90934b5ca93c...52e2951b4519ef469bb18045bcd2b47a9a804c05 - https://github.com/dotnet/xdt/compare/7c4241a4893ba0703dfad18762f217857073b526...0522205e7ee27c529c3253b51cae0b0b96a32f9a [marker]: <> (End:Footer:CodeFlow PR) --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Steve Pfister --- Directory.Build.props | 2 +- eng/Build-Native.cmd | 6 +-- eng/Version.Details.xml | 46 ++++++++--------- eng/Versions.props | 20 ++++---- eng/build.sh | 6 +-- eng/common/build.sh | 2 +- eng/common/core-templates/job/onelocbuild.yml | 5 +- .../job/publish-build-assets.yml | 49 ++++++++++++++++--- .../steps/install-microbuild.yml | 4 ++ .../core-templates/steps/source-build.yml | 6 --- .../steps/source-index-stage1-publish.yml | 6 +-- eng/common/cross/build-rootfs.sh | 4 +- eng/common/dotnet.cmd | 7 +++ eng/common/dotnet.ps1 | 11 +++++ eng/common/dotnet.sh | 26 ++++++++++ eng/common/internal/NuGet.config | 3 ++ eng/common/templates/vmr-build-pr.yml | 29 +++++++---- eng/common/tools.ps1 | 24 ++------- eng/common/tools.sh | 25 ++-------- eng/common/vmr-sync.ps1 | 6 +-- eng/common/vmr-sync.sh | 6 ++- eng/native/build-commons.sh | 22 ++++----- global.json | 6 +-- ...icrosoft.Diagnostics.NETCore.Client.csproj | 5 +- src/SOS/SOS.UnitTests/SOS.cs | 6 +++ 25 files changed, 200 insertions(+), 132 deletions(-) create mode 100644 eng/common/dotnet.cmd create mode 100644 eng/common/dotnet.ps1 create mode 100755 eng/common/dotnet.sh diff --git a/Directory.Build.props b/Directory.Build.props index 393951b02c..7b25fe55b3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -27,7 +27,7 @@ This represents the minimum supported .NET Version, so the min version that the tools must be able to run against for a simple customer experience. - When bumping this, bump __targetRid in build.sh/build-native.cmd and modify the + When bumping this, bump __targetFramework in build.sh/build-native.cmd and modify the Debugger.Tests.Configs to reflect the new TFMs --> 8.0 diff --git a/eng/Build-Native.cmd b/eng/Build-Native.cmd index b68feb691d..fead091366 100644 --- a/eng/Build-Native.cmd +++ b/eng/Build-Native.cmd @@ -211,9 +211,9 @@ if %__BuildNative% EQU 1 ( REM Copy the native SOS binaries to where these tools expect for CI & VS testing -set "__targetRid=net8.0" -set "__dotnet_sos=%__RootBinDir%\bin\dotnet-sos\%__BuildType%\%__targetRid%" -set "__dotnet_dump=%__RootBinDir%\bin\dotnet-dump\%__BuildType%\%__targetRid%" +set "__targetFramework=net8.0" +set "__dotnet_sos=%__RootBinDir%\bin\dotnet-sos\%__BuildType%\%__targetFramework%" +set "__dotnet_dump=%__RootBinDir%\bin\dotnet-dump\%__BuildType%\%__targetFramework%" mkdir %__dotnet_sos%\win-%__TargetArch% mkdir %__dotnet_sos%\publish\win-%__TargetArch% mkdir %__dotnet_dump%\win-%__TargetArch% diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bb331b6c82..b923133b81 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,5 +1,5 @@ - + https://github.com/microsoft/clrmd @@ -11,53 +11,53 @@ - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f https://github.com/dotnet/arcade ccfe6da198c5f05534863bbb1bff66e830e0c6ab - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f - + https://github.com/dotnet/dotnet - f5705c8f4c5079bba77bae8698ba1583bde0388c + 7cd445ec6160e1edbe0c96caa5aa395822403d7f diff --git a/eng/Versions.props b/eng/Versions.props index 84ecb76522..feb6365222 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -19,13 +19,13 @@ - 10.0.0-preview.6.25276.103 - 10.0.0-preview.6.25276.103 + 10.0.0-preview.7.25325.106 + 10.0.0-preview.7.25325.106 - 10.0.0-preview.6.25276.103 - 10.0.0-preview.6.25276.103 + 10.0.0-preview.7.25325.106 + 10.0.0-preview.7.25325.106 - 10.0.100-preview.6.25276.103 + 10.0.100-preview.7.25325.106 @@ -58,7 +58,7 @@ 8.0.0 8.0.5 2.0.3 - 10.0.0-beta.25276.103 + 10.0.0-beta.25325.106 1.2.0-beta.556 7.0.0-beta.22316.2 10.0.26100.1 @@ -71,8 +71,8 @@ Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure they do not break the local dev experience. --> - 5.0.0-1.25276.103 - 5.0.0-1.25276.103 + 5.0.0-1.25325.106 + 5.0.0-1.25325.106 4.11.0-2.24271.11 3.11.0 @@ -86,8 +86,8 @@ 4.4.0 4.8.0 $(MicrosoftCodeAnalysisVersion) - 5.0.0-1.25276.103 - 10.0.0-preview.25276.103 + 5.0.0-1.25325.106 + 10.0.0-preview.25325.106 diff --git a/eng/build.sh b/eng/build.sh index e505a5c80d..72a9783489 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -228,9 +228,9 @@ fi # if [[ "$__NativeBuild" == 1 || "$__Test" == 1 ]]; then - __targetRid=net8.0 - __dotnet_sos=$__RootBinDir/bin/dotnet-sos/$__BuildType/$__targetRid/publish/$__OutputRid - __dotnet_dump=$__RootBinDir/bin/dotnet-dump/$__BuildType/$__targetRid/publish/$__OutputRid + __targetFramework=net8.0 + __dotnet_sos=$__RootBinDir/bin/dotnet-sos/$__BuildType/$__targetFramework/publish/$__TargetRid + __dotnet_dump=$__RootBinDir/bin/dotnet-dump/$__BuildType/$__targetFramework/publish/$__TargetRid mkdir -p "$__dotnet_sos" mkdir -p "$__dotnet_dump" diff --git a/eng/common/build.sh b/eng/common/build.sh index b105db583c..9767bb411a 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -257,7 +257,7 @@ function Build { /p:Sign=$sign \ /p:Publish=$publish \ /p:RestoreStaticGraphEnableBinaryLogger=$binary_log \ - "${properties[@]}" + ${properties[@]+"${properties[@]}"} ExitWithExitCode 0 } diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index 00feec8ebb..8034815f42 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -86,8 +86,7 @@ jobs: isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} ${{ if eq(parameters.CreatePr, true) }}: isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} - ${{ if eq(parameters.RepoType, 'gitHub') }}: - isShouldReusePrSelected: ${{ parameters.ReusePr }} + isShouldReusePrSelected: ${{ parameters.ReusePr }} packageSourceAuth: patAuth patVariable: ${{ parameters.CeapexPat }} ${{ if eq(parameters.RepoType, 'gitHub') }}: @@ -118,4 +117,4 @@ jobs: pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/' publishLocation: Container artifactName: Loc - condition: ${{ parameters.condition }} \ No newline at end of file + condition: ${{ parameters.condition }} diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index 4f1dc42e02..d5303229c9 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -32,6 +32,12 @@ parameters: # Optional: 🌤️ or not the build has assets it wants to publish to BAR isAssetlessBuild: false + # Optional, publishing version + publishingVersion: 3 + + # Optional: A minimatch pattern for the asset manifests to publish to BAR + assetManifestsPattern: '*/manifests/**/*.xml' + jobs: - job: Asset_Registry_Publish @@ -77,13 +83,31 @@ jobs: clean: true - ${{ if eq(parameters.isAssetlessBuild, 'false') }}: - - task: DownloadPipelineArtifact@2 - displayName: Download Asset Manifests - inputs: - artifactName: AssetManifests - targetPath: '$(Build.StagingDirectory)/AssetManifests' - condition: ${{ parameters.condition }} - continueOnError: ${{ parameters.continueOnError }} + - ${{ if eq(parameters.publishingVersion, 3) }}: + - task: DownloadPipelineArtifact@2 + displayName: Download Asset Manifests + inputs: + artifactName: AssetManifests + targetPath: '$(Build.StagingDirectory)/AssetManifests' + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + - ${{ if eq(parameters.publishingVersion, 4) }}: + - task: DownloadPipelineArtifact@2 + displayName: Download V4 asset manifests + inputs: + itemPattern: '*/manifests/**/*.xml' + targetPath: '$(Build.StagingDirectory)/AllAssetManifests' + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + - task: CopyFiles@2 + displayName: Copy V4 asset manifests to AssetManifests + inputs: + SourceFolder: '$(Build.StagingDirectory)/AllAssetManifests' + Contents: ${{ parameters.assetManifestsPattern }} + TargetFolder: '$(Build.StagingDirectory)/AssetManifests' + flattenFolders: true + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} - task: NuGetAuthenticate@1 @@ -120,6 +144,17 @@ jobs: Copy-Item -Path $symbolExclusionfile -Destination "$(Build.StagingDirectory)/ReleaseConfigs" } + - ${{ if eq(parameters.publishingVersion, 4) }}: + - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + args: + targetPath: '$(Build.ArtifactStagingDirectory)/MergedManifest.xml' + artifactName: AssetManifests + displayName: 'Publish Merged Manifest' + retryCountOnTaskFailure: 10 # for any logs being locked + sbomEnabled: false # we don't need SBOM for logs + - template: /eng/common/core-templates/steps/publish-build-artifacts.yml parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} diff --git a/eng/common/core-templates/steps/install-microbuild.yml b/eng/common/core-templates/steps/install-microbuild.yml index a3540ba00c..f3064a7834 100644 --- a/eng/common/core-templates/steps/install-microbuild.yml +++ b/eng/common/core-templates/steps/install-microbuild.yml @@ -30,6 +30,10 @@ steps: ${{ if and(eq(parameters.enableMicrobuildForMacAndLinux, 'true'), ne(variables['Agent.Os'], 'Windows_NT')) }}: azureSubscription: 'MicroBuild Signing Task (DevDiv)' useEsrpCli: true + ${{ elseif eq(variables['System.TeamProject'], 'DevDiv') }}: + ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea + ${{ else }}: + ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca env: TeamName: $(_TeamName) MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }} diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index 0dde553c3e..acf16ed349 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -38,11 +38,6 @@ steps: targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}' fi - baseRidArgs= - if [ '${{ parameters.platform.baseRID }}' != '' ]; then - baseRidArgs='/p:BaseRid=${{ parameters.platform.baseRID }}' - fi - portableBuildArgs= if [ '${{ parameters.platform.portableBuild }}' != '' ]; then portableBuildArgs='/p:PortableBuild=${{ parameters.platform.portableBuild }}' @@ -55,7 +50,6 @@ steps: ${{ parameters.platform.buildArguments }} \ $internalRuntimeDownloadArgs \ $targetRidArgs \ - $baseRidArgs \ $portableBuildArgs \ displayName: Build diff --git a/eng/common/core-templates/steps/source-index-stage1-publish.yml b/eng/common/core-templates/steps/source-index-stage1-publish.yml index 99c2326fc1..c2917c1efc 100644 --- a/eng/common/core-templates/steps/source-index-stage1-publish.yml +++ b/eng/common/core-templates/steps/source-index-stage1-publish.yml @@ -1,15 +1,15 @@ parameters: sourceIndexUploadPackageVersion: 2.0.0-20250425.2 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250515.1 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json binlogPath: artifacts/log/Debug/Build.binlog steps: - task: UseDotNet@2 - displayName: "Source Index: Use .NET 8 SDK" + displayName: "Source Index: Use .NET 9 SDK" inputs: packageType: sdk - version: 8.0.x + version: 9.0.x installationPath: $(Agent.TempDirectory)/dotnet workingDirectory: $(Agent.TempDirectory) diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index d6f005b5da..8abfb71f72 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -295,8 +295,8 @@ while :; do ;; noble) # Ubuntu 24.04 __CodeName=noble - if [[ -n "$__LLDB_Package" ]]; then - __LLDB_Package="liblldb-18-dev" + if [[ -z "$__LLDB_Package" ]]; then + __LLDB_Package="liblldb-19-dev" fi ;; stretch) # Debian 9 diff --git a/eng/common/dotnet.cmd b/eng/common/dotnet.cmd new file mode 100644 index 0000000000..527fa4bb38 --- /dev/null +++ b/eng/common/dotnet.cmd @@ -0,0 +1,7 @@ +@echo off + +:: This script is used to install the .NET SDK. +:: It will also invoke the SDK with any provided arguments. + +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet.ps1""" %*" +exit /b %ErrorLevel% diff --git a/eng/common/dotnet.ps1 b/eng/common/dotnet.ps1 new file mode 100644 index 0000000000..45e5676c9e --- /dev/null +++ b/eng/common/dotnet.ps1 @@ -0,0 +1,11 @@ +# This script is used to install the .NET SDK. +# It will also invoke the SDK with any provided arguments. + +. $PSScriptRoot\tools.ps1 +$dotnetRoot = InitializeDotNetCli -install:$true + +# Invoke acquired SDK with args if they are provided +if ($args.count -gt 0) { + $env:DOTNET_NOLOGO=1 + & "$dotnetRoot\dotnet.exe" $args +} diff --git a/eng/common/dotnet.sh b/eng/common/dotnet.sh new file mode 100755 index 0000000000..2ef6823567 --- /dev/null +++ b/eng/common/dotnet.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# This script is used to install the .NET SDK. +# It will also invoke the SDK with any provided arguments. + +source="${BASH_SOURCE[0]}" +# resolve $SOURCE until the file is no longer a symlink +while [[ -h $source ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +source $scriptroot/tools.sh +InitializeDotNetCli true # install + +# Invoke acquired SDK with args if they are provided +if [[ $# > 0 ]]; then + __dotnetDir=${_InitializeDotNetCli} + dotnetPath=${__dotnetDir}/dotnet + ${dotnetPath} "$@" +fi diff --git a/eng/common/internal/NuGet.config b/eng/common/internal/NuGet.config index 19d3d311b1..f70261ed68 100644 --- a/eng/common/internal/NuGet.config +++ b/eng/common/internal/NuGet.config @@ -4,4 +4,7 @@ + + + diff --git a/eng/common/templates/vmr-build-pr.yml b/eng/common/templates/vmr-build-pr.yml index 670cf32c3b..ce3c29a62f 100644 --- a/eng/common/templates/vmr-build-pr.yml +++ b/eng/common/templates/vmr-build-pr.yml @@ -1,14 +1,23 @@ +# This pipeline is used for running the VMR verification of the PR changes in repo-level PRs. +# +# It will run a full set of verification jobs defined in: +# https://github.com/dotnet/dotnet/blob/10060d128e3f470e77265f8490f5e4f72dae738e/eng/pipelines/templates/stages/vmr-build.yml#L27-L38 +# +# For repos that do not need to run the full set, you would do the following: +# +# 1. Copy this YML file to a repo-specific location, i.e. outside of eng/common. +# +# 2. Add `verifications` parameter to VMR template reference +# +# Examples: +# - For source-build stage 1 verification, add the following: +# verifications: [ "source-build-stage1" ] +# +# - For Windows only verifications, add the following: +# verifications: [ "unified-build-windows-x64", "unified-build-windows-x86" ] + trigger: none -pr: - branches: - include: - - main - - release/* - paths: - exclude: - - documentation/* - - README.md - - CODEOWNERS +pr: none variables: - template: /eng/common/templates/variables/pool-providers.yml@self diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 046ec9d08a..40f0aa8612 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -644,7 +644,6 @@ function GetNuGetPackageCachePath() { $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages\' } else { $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\' - $env:RESTORENOHTTPCACHE = $true } } @@ -766,28 +765,13 @@ function MSBuild() { $toolsetBuildProject = InitializeToolset $basePath = Split-Path -parent $toolsetBuildProject - $possiblePaths = @( - # new scripts need to work with old packages, so we need to look for the old names/versions - (Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')), - (Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')), - - # This list doesn't need to be updated anymore and can eventually be removed. - (Join-Path $basePath (Join-Path net9.0 'Microsoft.DotNet.ArcadeLogging.dll')), - (Join-Path $basePath (Join-Path net9.0 'Microsoft.DotNet.Arcade.Sdk.dll')), - (Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.ArcadeLogging.dll')), - (Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.Arcade.Sdk.dll')) - ) - $selectedPath = $null - foreach ($path in $possiblePaths) { - if (Test-Path $path -PathType Leaf) { - $selectedPath = $path - break - } - } + $selectedPath = Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll') + if (-not $selectedPath) { - Write-PipelineTelemetryError -Category 'Build' -Message 'Unable to find arcade sdk logger assembly.' + Write-PipelineTelemetryError -Category 'Build' -Message "Unable to find arcade sdk logger assembly: $selectedPath" ExitWithExitCode 1 } + $args += "/logger:$selectedPath" } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 8bc68e8460..3def02a638 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -345,14 +345,12 @@ function InitializeBuildTool { _InitializeBuildToolCommand="msbuild" } -# Set RestoreNoHttpCache as a workaround for https://github.com/NuGet/Home/issues/3116 function GetNuGetPackageCachePath { if [[ -z ${NUGET_PACKAGES:-} ]]; then if [[ "$use_global_nuget_cache" == true ]]; then export NUGET_PACKAGES="$HOME/.nuget/packages/" else export NUGET_PACKAGES="$repo_root/.packages/" - export RESTORENOHTTPCACHE=true fi fi @@ -449,27 +447,13 @@ function MSBuild { fi local toolset_dir="${_InitializeToolset%/*}" - # new scripts need to work with old packages, so we need to look for the old names/versions - local selectedPath= - local possiblePaths=() - possiblePaths+=( "$toolset_dir/net/Microsoft.DotNet.ArcadeLogging.dll" ) - possiblePaths+=( "$toolset_dir/net/Microsoft.DotNet.Arcade.Sdk.dll" ) - - # This list doesn't need to be updated anymore and can eventually be removed. - possiblePaths+=( "$toolset_dir/net9.0/Microsoft.DotNet.ArcadeLogging.dll" ) - possiblePaths+=( "$toolset_dir/net9.0/Microsoft.DotNet.Arcade.Sdk.dll" ) - possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.ArcadeLogging.dll" ) - possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.Arcade.Sdk.dll" ) - for path in "${possiblePaths[@]}"; do - if [[ -f $path ]]; then - selectedPath=$path - break - fi - done + local selectedPath="$toolset_dir/net/Microsoft.DotNet.ArcadeLogging.dll" + if [[ -z "$selectedPath" ]]; then - Write-PipelineTelemetryError -category 'Build' "Unable to find arcade sdk logger assembly." + Write-PipelineTelemetryError -category 'Build' "Unable to find arcade sdk logger assembly: $selectedPath" ExitWithExitCode 1 fi + args+=( "-logger:$selectedPath" ) fi @@ -530,6 +514,7 @@ function GetDarc { fi "$eng_root/common/darc-init.sh" --toolpath "$darc_path" $version + darc_tool="$darc_path/darc" } # Returns a full path to an Arcade SDK task project file. diff --git a/eng/common/vmr-sync.ps1 b/eng/common/vmr-sync.ps1 index 8c3c91ce8d..97302f3205 100755 --- a/eng/common/vmr-sync.ps1 +++ b/eng/common/vmr-sync.ps1 @@ -103,14 +103,14 @@ Set-StrictMode -Version Latest Highlight 'Installing .NET, preparing the tooling..' . .\eng\common\tools.ps1 $dotnetRoot = InitializeDotNetCli -install:$true +$darc = Get-Darc $dotnet = "$dotnetRoot\dotnet.exe" -& "$dotnet" tool restore Highlight "Starting the synchronization of VMR.." # Synchronize the VMR $darcArgs = ( - "darc", "vmr", "forwardflow", + "vmr", "forwardflow", "--tmp", $tmpDir, "--$verbosity", $vmrDir @@ -124,7 +124,7 @@ if ($azdevPat) { $darcArgs += ("--azdev-pat", $azdevPat) } -& "$dotnet" $darcArgs +& "$darc" $darcArgs if ($LASTEXITCODE -eq 0) { Highlight "Synchronization succeeded" diff --git a/eng/common/vmr-sync.sh b/eng/common/vmr-sync.sh index 86d77ccf5b..44239e331c 100755 --- a/eng/common/vmr-sync.sh +++ b/eng/common/vmr-sync.sh @@ -164,9 +164,9 @@ set -e highlight 'Installing .NET, preparing the tooling..' source "./eng/common/tools.sh" InitializeDotNetCli true +GetDarc dotnetDir=$( cd ./.dotnet/; pwd -P ) dotnet=$dotnetDir/dotnet -"$dotnet" tool restore highlight "Starting the synchronization of VMR.." set +e @@ -186,7 +186,9 @@ fi # Synchronize the VMR -"$dotnet" darc vmr forwardflow \ +export DOTNET_ROOT="$dotnetDir" + +"$darc_tool" vmr forwardflow \ --tmp "$tmp_dir" \ $azdev_pat \ --$verbosity \ diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index 2cf33442a9..e0346c9d33 100755 --- a/eng/native/build-commons.sh +++ b/eng/native/build-commons.sh @@ -266,7 +266,7 @@ usage() echo "-gccx.y: optional argument to build using gcc version x.y." echo "-ninja: target ninja instead of GNU make" echo "-numproc: set the number of build processes." - echo "-outputrid: optional argument that overrides the target rid name." + echo "-targetrid: optional argument that overrides the target rid name." echo "-portablebuild: pass -portablebuild=false to force a non-portable build." echo "-skipconfigure: skip build configuration." echo "-keepnativesymbols: keep native/unmanaged debug symbols." @@ -286,7 +286,7 @@ source "$__RepoRootDir/eng/common/native/init-os-and-arch.sh" __TargetArch=$arch __TargetOS=$os -__OutputRid='' +__TargetRid='' # Get the number of processors available to the scheduler platform="$(uname -s | tr '[:upper:]' '[:lower:]')" @@ -458,12 +458,12 @@ while :; do __TargetArch=wasm ;; - outputrid|-outputrid) + targetrid|-targetrid|outputrid|-outputrid) if [[ -n "$2" ]]; then - __OutputRid="$2" + __TargetRid="$2" shift else - echo "ERROR: 'outputrid' requires a non-empty option argument" + echo "ERROR: 'targetrid' requires a non-empty option argument" exit 1 fi ;; @@ -565,15 +565,15 @@ fi # init the target distro name (__DistroRid) and target portable os (__PortableTargetOS). initTargetDistroRid -if [ -z "$__OutputRid" ]; then +if [ -z "$__TargetRid" ]; then if [[ "$__PortableBuild" == 0 ]]; then - __OutputRid="$__DistroRid" + __TargetRid="$__DistroRid" else - __OutputRid="$__PortableTargetOS-$__TargetArch" + __TargetRid="$__PortableTargetOS-$__TargetArch" fi fi -export __OutputRid -echo "__OutputRid: ${__OutputRid}" +export __TargetRid +echo "__TargetRid: ${__TargetRid}" # When the host runs on an unknown rid, it falls back to the output rid -__HostFallbackOS="${__OutputRid%-*}" # Strip architecture +__HostFallbackOS="${__TargetRid%-*}" # Strip architecture diff --git a/global.json b/global.json index c36dcaacaf..7c14b7ed47 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "10.0.100-preview.6.25272.112", + "version": "10.0.100-preview.6.25315.102", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "10.0.100-preview.6.25272.112", + "dotnet": "10.0.100-preview.6.25315.102", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreApp80Version)" @@ -17,6 +17,6 @@ }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.5.0", - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25276.103" + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25325.106" } } diff --git a/src/Microsoft.Diagnostics.NETCore.Client/Microsoft.Diagnostics.NETCore.Client.csproj b/src/Microsoft.Diagnostics.NETCore.Client/Microsoft.Diagnostics.NETCore.Client.csproj index 095957370b..c006330b90 100644 --- a/src/Microsoft.Diagnostics.NETCore.Client/Microsoft.Diagnostics.NETCore.Client.csproj +++ b/src/Microsoft.Diagnostics.NETCore.Client/Microsoft.Diagnostics.NETCore.Client.csproj @@ -14,7 +14,10 @@ true false true - + + diff --git a/src/SOS/SOS.UnitTests/SOS.cs b/src/SOS/SOS.UnitTests/SOS.cs index 365c4f3307..578e6f609b 100644 --- a/src/SOS/SOS.UnitTests/SOS.cs +++ b/src/SOS/SOS.UnitTests/SOS.cs @@ -353,6 +353,12 @@ await SOSTestHelpers.RunTest( [SkippableTheory, MemberData(nameof(Configurations))] public async Task StackTests(TestConfiguration config) { + if (config.RuntimeFrameworkVersionMajor == 10) + { + // The clrstack -i command regressed on .NET 10 win-x86, so skip this test for now. + SOSTestHelpers.SkipIfWinX86(config); + } + await SOSTestHelpers.RunTest( config, debuggeeName: "NestedExceptionTest", From e32a259690378945a52bc8ac5cc5e302d9beb193 Mon Sep 17 00:00:00 2001 From: Jeff Schwartz Date: Fri, 27 Jun 2025 11:17:13 -0700 Subject: [PATCH 11/26] Update typo in comment (#5512) Based on compliance tooling, fixed a typo in a comment --- src/SOS/lldbplugin/swift-4.1/lldb/Target/Memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SOS/lldbplugin/swift-4.1/lldb/Target/Memory.h b/src/SOS/lldbplugin/swift-4.1/lldb/Target/Memory.h index af6be15df9..a06a1e4184 100644 --- a/src/SOS/lldbplugin/swift-4.1/lldb/Target/Memory.h +++ b/src/SOS/lldbplugin/swift-4.1/lldb/Target/Memory.h @@ -65,7 +65,7 @@ class MemoryCache { BlockMap m_L1_cache; // A first level memory cache whose chunk sizes vary that // will be used only if the memory read fits entirely in // a chunk - BlockMap m_L2_cache; // A memory cache of fixed size chinks + BlockMap m_L2_cache; // A memory cache of fixed size chunks // (m_L2_cache_line_byte_size bytes in size each) InvalidRanges m_invalid_ranges; Process &m_process; From f903b9dcd4a2099474aa08ea1f1b4dc923a71049 Mon Sep 17 00:00:00 2001 From: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com> Date: Wed, 2 Jul 2025 12:42:08 -0700 Subject: [PATCH 12/26] Update build.sh to error on native build failures (#5515) Build.sh looked at the exit code of the tee command for the native build. Check the 0th exit code for the native build. Co-authored-by: Steve Pfister --- eng/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/build.sh b/eng/build.sh index 72a9783489..01df8c8e6a 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -217,7 +217,7 @@ fi if [[ "$__NativeBuild" == 1 ]]; then build_native "$__TargetOS" "$__TargetArch" "$__RepoRootDir" "$__IntermediatesDir" "install" "$__ExtraCmakeArgs" "diagnostic component" | tee "$__LogsDir"/make.log - if [ "$?" != 0 ]; then + if [ "${PIPESTATUS[0]}" != 0 ]; then echo "Native build FAILED" exit 1 fi From 8d8f308513135d5aba311b745760ca179090b5cb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 15:23:24 -0700 Subject: [PATCH 13/26] [main] Source code updates from dotnet/dotnet (#5511) > [!NOTE] > This is a codeflow update. It may contain both source code changes from [the VMR](https://github.com/dotnet/dotnet) as well as dependency updates. Learn more [here](https://github.com/dotnet/dotnet/tree/main/docs/Codeflow-PRs.md). This pull request brings the following source code changes [marker]: <> (Begin:7e2c91d5-dafe-449a-9d20-a3d5aa478584) ## From https://github.com/dotnet/dotnet - **Subscription**: [7e2c91d5-dafe-449a-9d20-a3d5aa478584](https://maestro.dot.net/subscriptions?search=7e2c91d5-dafe-449a-9d20-a3d5aa478584) - **Build**: [20250701.5](https://dev.azure.com/dnceng/internal/_build/results?buildId=2741231) - **Date Produced**: July 2, 2025 1:07:44 AM UTC - **Commit**: [df4663b92c2f2d25b66e44524478d9016c812949](https://github.com/dotnet/dotnet/commit/df4663b92c2f2d25b66e44524478d9016c812949) - **Commit Diff**: [7cd445e...df4663b](https://github.com/dotnet/dotnet/compare/7cd445ec6160e1edbe0c96caa5aa395822403d7f...df4663b92c2f2d25b66e44524478d9016c812949) - **Branch**: main **Updated Dependencies** - From [10.0.0-beta.25325.106 to 10.0.0-beta.25351.105][4] - Microsoft.DotNet.Arcade.Sdk - Microsoft.DotNet.CodeAnalysis - From [10.0.100-preview.7.25325.106 to 10.0.100-preview.7.25351.105][4] - Microsoft.NET.Sdk - From [10.0.0-preview.7.25325.106 to 10.0.0-preview.7.25351.105][4] - Microsoft.AspNetCore.App.Ref - Microsoft.AspNetCore.App.Ref.Internal - Microsoft.NETCore.App.Ref - Microsoft.NETCore.Platforms - From [5.0.0-1.25325.106 to 5.0.0-1.25351.105][4] - Microsoft.CodeAnalysis - Microsoft.CodeAnalysis.Analyzers - Microsoft.CodeAnalysis.CSharp - From [10.0.0-preview.25325.106 to 10.0.0-preview.25351.105][4] - Microsoft.CodeAnalysis.NetAnalyzers [marker]: <> (End:7e2c91d5-dafe-449a-9d20-a3d5aa478584) [1]: https://github.com/dotnet/dotnet/compare/7cd445ec61...1bc437cd77 [2]: https://github.com/dotnet/dotnet/compare/7cd445ec61...72e8593d62 [3]: https://github.com/dotnet/dotnet/compare/7cd445ec61...2fd058a201 [4]: https://github.com/dotnet/dotnet/compare/7cd445ec61...df4663b92c [marker]: <> (Start:Footer:CodeFlow PR) ## Associated changes in source repos - https://github.com/dotnet/arcade/compare/5fe468883c4a203f57a1b163167e61a24748625a...0e335649fe2d2f98ea51e55cc1a0899af3617eba - https://github.com/dotnet/aspnetcore/compare/f2353d2504c8c575bc0df9a5c8490aa5e2526e62...9e69f19a5c7efa19577627a62c029ff387810d50 - https://github.com/dotnet/deployment-tools/compare/ea2bdda50b4e66d7e7d877b37eeea5974693c6a1...1478b7e6938013629e182b0656bfbde04d367cc5 - https://github.com/dotnet/efcore/compare/d2e60e7fdb8676964c56115e53449564a256632b...14b439c0bcf7cb81899457e4cbd14640cc365578 - https://github.com/dotnet/fsharp/compare/44a24dcd6677639f3b62e361d99f6495175dc49f...7346d84a24dd15155d74f8179788a423cbdd962a - https://github.com/dotnet/msbuild/compare/21e814e9460cc3323848c1132eca4e72cf051a5f...0e2431add8a483acfd985c6fdd352ebfcade6755 - https://github.com/dotnet/razor/compare/c60ff6979c94e41675d9f092e2e9161ef2e41493...58de0c1a5c1fadf56a848dd45d91440ae041e22c - https://github.com/dotnet/roslyn-analyzers/compare/aabbaa2c6459fd586ad4258c8bd6059dac8ba4e6...62b0e094420a1f93d32ecb338aff8ad498ec9cd5 - https://github.com/dotnet/runtime/compare/53924485e03b81f0ae87651e19b89d2a71c136fe...61f2ad644f82a7208eb925bedc3bae49754e4440 - https://github.com/dotnet/sourcelink/compare/634059dd61cb2de8a5fbed786093790a78ce0de7...3e1ad8d7d7799cfa18eca11b0c071eec3395b0c1 - https://github.com/dotnet/templating/compare/47d652fd0d57f213226c192f551be66bd5955915...bbbcb1d9bb33264e618581165807fd59c2ffa3f4 - https://github.com/dotnet/windowsdesktop/compare/37ba7be40a4af897f1d390d44fc416000c31ed24...3406b151b95d3c15cb98e038a05583fc865c575b - https://github.com/dotnet/winforms/compare/ee675d36d37a4a11947b47e1a2e0722c94b6337b...d93ffb3c466bb157f8a5ef3941d5e94aad1b3993 - https://github.com/dotnet/wpf/compare/52e2951b4519ef469bb18045bcd2b47a9a804c05...28843aafcedc8299336ae470c868f842a4ca52b4 - https://github.com/dotnet/xdt/compare/0522205e7ee27c529c3253b51cae0b0b96a32f9a...0d66c1314c16a831f1289b1e4b1adbe0d8b94404 [marker]: <> (End:Footer:CodeFlow PR) --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 46 ++++++++++++++++++++--------------------- eng/Versions.props | 20 +++++++++--------- global.json | 2 +- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b923133b81..a934508465 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,5 +1,5 @@ - + https://github.com/microsoft/clrmd @@ -11,53 +11,53 @@ - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 https://github.com/dotnet/arcade ccfe6da198c5f05534863bbb1bff66e830e0c6ab - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 - + https://github.com/dotnet/dotnet - 7cd445ec6160e1edbe0c96caa5aa395822403d7f + df4663b92c2f2d25b66e44524478d9016c812949 diff --git a/eng/Versions.props b/eng/Versions.props index feb6365222..207b89980d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -19,13 +19,13 @@ - 10.0.0-preview.7.25325.106 - 10.0.0-preview.7.25325.106 + 10.0.0-preview.7.25351.105 + 10.0.0-preview.7.25351.105 - 10.0.0-preview.7.25325.106 - 10.0.0-preview.7.25325.106 + 10.0.0-preview.7.25351.105 + 10.0.0-preview.7.25351.105 - 10.0.100-preview.7.25325.106 + 10.0.100-preview.7.25351.105 @@ -58,7 +58,7 @@ 8.0.0 8.0.5 2.0.3 - 10.0.0-beta.25325.106 + 10.0.0-beta.25351.105 1.2.0-beta.556 7.0.0-beta.22316.2 10.0.26100.1 @@ -71,8 +71,8 @@ Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure they do not break the local dev experience. --> - 5.0.0-1.25325.106 - 5.0.0-1.25325.106 + 5.0.0-1.25351.105 + 5.0.0-1.25351.105 4.11.0-2.24271.11 3.11.0 @@ -86,8 +86,8 @@ 4.4.0 4.8.0 $(MicrosoftCodeAnalysisVersion) - 5.0.0-1.25325.106 - 10.0.0-preview.25325.106 + 5.0.0-1.25351.105 + 10.0.0-preview.25351.105 diff --git a/global.json b/global.json index 7c14b7ed47..0453d56cc4 100644 --- a/global.json +++ b/global.json @@ -17,6 +17,6 @@ }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.5.0", - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25325.106" + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25351.105" } } From 4e54d322759e7248b14ce40d8b24eb5947a054a1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 12:20:28 -0400 Subject: [PATCH 14/26] [main] Source code updates from dotnet/dotnet (#5516) > [!NOTE] > This is a codeflow update. It may contain both source code changes from [the VMR](https://github.com/dotnet/dotnet) as well as dependency updates. Learn more [here](https://github.com/dotnet/dotnet/tree/main/docs/Codeflow-PRs.md). This pull request brings the following source code changes [marker]: <> (Begin:7e2c91d5-dafe-449a-9d20-a3d5aa478584) ## From https://github.com/dotnet/dotnet - **Subscription**: [7e2c91d5-dafe-449a-9d20-a3d5aa478584](https://maestro.dot.net/subscriptions?search=7e2c91d5-dafe-449a-9d20-a3d5aa478584) - **Build**: [20250701.6](https://dev.azure.com/dnceng/internal/_build/results?buildId=2741398) - **Date Produced**: July 2, 2025 9:28:11 AM UTC - **Commit**: [eaa19c281d34580a8168cff9ce1e7337da8bfe4f](https://github.com/dotnet/dotnet/commit/eaa19c281d34580a8168cff9ce1e7337da8bfe4f) - **Commit Diff**: [df4663b...eaa19c2](https://github.com/dotnet/dotnet/compare/df4663b92c2f2d25b66e44524478d9016c812949...eaa19c281d34580a8168cff9ce1e7337da8bfe4f) - **Branch**: main **Updated Dependencies** - From [10.0.0-beta.25351.105 to 10.0.0-beta.25351.106][1] - Microsoft.DotNet.Arcade.Sdk - Microsoft.DotNet.CodeAnalysis - From [10.0.100-preview.7.25351.105 to 10.0.100-preview.7.25351.106][1] - Microsoft.NET.Sdk - From [10.0.0-preview.7.25351.105 to 10.0.0-preview.7.25351.106][1] - Microsoft.AspNetCore.App.Ref - Microsoft.AspNetCore.App.Ref.Internal - Microsoft.NETCore.App.Ref - Microsoft.NETCore.Platforms - From [5.0.0-1.25351.105 to 5.0.0-1.25351.106][1] - Microsoft.CodeAnalysis - Microsoft.CodeAnalysis.Analyzers - Microsoft.CodeAnalysis.CSharp - From [10.0.0-preview.25351.105 to 10.0.0-preview.25351.106][1] - Microsoft.CodeAnalysis.NetAnalyzers [marker]: <> (End:7e2c91d5-dafe-449a-9d20-a3d5aa478584) [1]: https://github.com/dotnet/dotnet/compare/df4663b92c...eaa19c281d [marker]: <> (Start:Footer:CodeFlow PR) ## Associated changes in source repos - https://github.com/dotnet/sdk/compare/0e9898bbc2834154ba0afdfb8372acd02d39ef01...4177291d4d3dabd5341239d01b3e844125659304 [marker]: <> (End:Footer:CodeFlow PR) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 46 ++++++++++++++++++++--------------------- eng/Versions.props | 20 +++++++++--------- global.json | 2 +- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a934508465..3548bfe0f4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,5 +1,5 @@ - + https://github.com/microsoft/clrmd @@ -11,53 +11,53 @@ - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f https://github.com/dotnet/arcade ccfe6da198c5f05534863bbb1bff66e830e0c6ab - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet - df4663b92c2f2d25b66e44524478d9016c812949 + eaa19c281d34580a8168cff9ce1e7337da8bfe4f diff --git a/eng/Versions.props b/eng/Versions.props index 207b89980d..1c0d54f131 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -19,13 +19,13 @@ - 10.0.0-preview.7.25351.105 - 10.0.0-preview.7.25351.105 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 - 10.0.0-preview.7.25351.105 - 10.0.0-preview.7.25351.105 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 - 10.0.100-preview.7.25351.105 + 10.0.100-preview.7.25351.106 @@ -58,7 +58,7 @@ 8.0.0 8.0.5 2.0.3 - 10.0.0-beta.25351.105 + 10.0.0-beta.25351.106 1.2.0-beta.556 7.0.0-beta.22316.2 10.0.26100.1 @@ -71,8 +71,8 @@ Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure they do not break the local dev experience. --> - 5.0.0-1.25351.105 - 5.0.0-1.25351.105 + 5.0.0-1.25351.106 + 5.0.0-1.25351.106 4.11.0-2.24271.11 3.11.0 @@ -86,8 +86,8 @@ 4.4.0 4.8.0 $(MicrosoftCodeAnalysisVersion) - 5.0.0-1.25351.105 - 10.0.0-preview.25351.105 + 5.0.0-1.25351.106 + 10.0.0-preview.25351.106 diff --git a/global.json b/global.json index 0453d56cc4..9c3adfeb03 100644 --- a/global.json +++ b/global.json @@ -17,6 +17,6 @@ }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.5.0", - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25351.105" + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25351.106" } } From 47b73d5bdbcab9e0943862d156a19c76f0c654b0 Mon Sep 17 00:00:00 2001 From: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com> Date: Wed, 9 Jul 2025 19:10:40 -0700 Subject: [PATCH 15/26] Add third party notices to global tool packages (#5520) - **Update TPN** - **Add TPN to all global tool packages** --- THIRD-PARTY-NOTICES.TXT | 1743 +++++++++++++++++++++++++++---- src/Tools/Directory.Build.props | 7 + 2 files changed, 1519 insertions(+), 231 deletions(-) diff --git a/THIRD-PARTY-NOTICES.TXT b/THIRD-PARTY-NOTICES.TXT index 835970834c..3bf4c6fc0c 100644 --- a/THIRD-PARTY-NOTICES.TXT +++ b/THIRD-PARTY-NOTICES.TXT @@ -1,254 +1,1535 @@ -.NET Core uses third-party libraries or other resources that may be -distributed under licenses different than the .NET Core software. +.NET Diagnostics uses third-party libraries or other resources that may be +distributed under licenses different than the .NET Diagnostics software. -Attributions and license notices for test cases originally authored by -third parties can be found in the respective test directories. +In the event that we accidentally failed to list a required notice, please +bring it to our attention. Post an issue or email us: + + dotnet@microsoft.com + +The attached notices are provided for information only. + +License notice for ASP.NET +------------------------------- + +Copyright (c) .NET Foundation. All rights reserved. +Licensed under the Apache License, Version 2.0. + +Available at +https://github.com/dotnet/aspnetcore/blob/main/LICENSE.txt + +License notice for Slicing-by-8 +------------------------------- + +http://sourceforge.net/projects/slicing-by-8/ + +Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved + + +This software program is licensed subject to the BSD License, available at +http://www.opensource.org/licenses/bsd-license.html. + + +License notice for Unicode data +------------------------------- + +https://www.unicode.org/license.html + +Copyright © 1991-2024 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in https://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. + +License notice for zlib-ng +----------------------- + +https://github.com/zlib-ng/zlib-ng/blob/d54e3769be0c522015b784eca2af258b1c026107/LICENSE.md + +(C) 1995-2024 Jean-loup Gailly and Mark Adler + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. + +License notice for opentelemetry-dotnet +--------------------------------------- + +https://github.com/open-telemetry/opentelemetry-dotnet/blob/805dd6b4abfa18ef2706d04c30d0ed28dbc2955e/LICENSE.TXT#L1 + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +Copyright The OpenTelemetry Authors + + +License notice for LinuxTracepoints +----------------------------------- + +https://github.com/microsoft/LinuxTracepoints/blob/main/LICENSE + +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE + +License notice for Mono +------------------------------- + +http://www.mono-project.com/docs/about-mono/ + +Copyright (c) .NET Foundation Contributors + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the Software), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License notice for International Organization for Standardization +----------------------------------------------------------------- + +Portions (C) International Organization for Standardization 1986: + Permission to copy in any form is granted for use with + conforming SGML systems and applications as defined in + ISO 8879, provided this notice is included in all copies. + +License notice for Intel +------------------------ + +"Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License notice for Xamarin and Novell +------------------------------------- + +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Copyright (c) 2011 Novell, Inc (http://www.novell.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Third party notice for W3C +-------------------------- + +"W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE +Status: This license takes effect 13 May, 2015. +This work is being provided by the copyright holders under the following license. +License +By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. +Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications: +The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. +Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included. +Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)." +Disclaimers +THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. Title to copyright in this work will at all times remain with copyright holders." + +License notice for Bit Twiddling Hacks +-------------------------------------- + +Bit Twiddling Hacks + +By Sean Eron Anderson +seander@cs.stanford.edu + +Individually, the code snippets here are in the public domain (unless otherwise +noted) — feel free to use them however you please. The aggregate collection and +descriptions are © 1997-2005 Sean Eron Anderson. The code and descriptions are +distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY and +without even the implied warranty of merchantability or fitness for a particular +purpose. + +License notice for Brotli +-------------------------------------- + +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +compress_fragment.c: +Copyright (c) 2011, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +decode_fuzzer.c: +Copyright (c) 2015 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + +License notice for Json.NET +------------------------------- + +https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md + +The MIT License (MIT) + +Copyright (c) 2007 James Newton-King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License notice for vectorized base64 encoding / decoding +-------------------------------------------------------- + +Copyright (c) 2005-2007, Nick Galbreath +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2016-2017, Matthieu Darbois +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License notice for vectorized hex parsing +-------------------------------------------------------- + +Copyright (c) 2022, Geoff Langdale +Copyright (c) 2022, Wojciech Mula +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License notice for RFC 3492 +--------------------------- + +The punycode implementation is based on the sample code in RFC 3492 + +Copyright (C) The Internet Society (2003). All Rights Reserved. + +This document and translations of it may be copied and furnished to +others, and derivative works that comment on or otherwise explain it +or assist in its implementation may be prepared, copied, published +and distributed, in whole or in part, without restriction of any +kind, provided that the above copyright notice and this paragraph are +included on all such copies and derivative works. However, this +document itself may not be modified in any way, such as by removing +the copyright notice or references to the Internet Society or other +Internet organizations, except as needed for the purpose of +developing Internet standards in which case the procedures for +copyrights defined in the Internet Standards process must be +followed, or as required to translate it into languages other than +English. + +The limited permissions granted above are perpetual and will not be +revoked by the Internet Society or its successors or assigns. + +This document and the information contained herein is provided on an +"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING +TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING +BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION +HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +Copyright(C) The Internet Society 1997. All Rights Reserved. + +This document and translations of it may be copied and furnished to others, +and derivative works that comment on or otherwise explain it or assist in +its implementation may be prepared, copied, published and distributed, in +whole or in part, without restriction of any kind, provided that the above +copyright notice and this paragraph are included on all such copies and +derivative works.However, this document itself may not be modified in any +way, such as by removing the copyright notice or references to the Internet +Society or other Internet organizations, except as needed for the purpose of +developing Internet standards in which case the procedures for copyrights +defined in the Internet Standards process must be followed, or as required +to translate it into languages other than English. + +The limited permissions granted above are perpetual and will not be revoked +by the Internet Society or its successors or assigns. + +This document and the information contained herein is provided on an "AS IS" +basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE +DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY +RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE. + +License notice for Algorithm from RFC 4122 - +A Universally Unique IDentifier (UUID) URN Namespace +---------------------------------------------------- + +Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & +Digital Equipment Corporation, Maynard, Mass. +Copyright (c) 1998 Microsoft. +To anyone who acknowledges that this file is provided "AS IS" +without any express or implied warranty: permission to use, copy, +modify, and distribute this file for any purpose is hereby +granted without fee, provided that the above copyright notices and +this notice appears in all source code copies, and that none of +the names of Open Software Foundation, Inc., Hewlett-Packard +Company, Microsoft, or Digital Equipment Corporation be used in +advertising or publicity pertaining to distribution of the software +without specific, written prior permission. Neither Open Software +Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital +Equipment Corporation makes any representations about the +suitability of this software for any purpose." + +License notice for The LLVM Compiler Infrastructure +--------------------------------------------------- + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +License notice for Bob Jenkins +------------------------------ + +By Bob Jenkins, 1996. bob_jenkins@burtleburtle.net. You may use this +code any way you wish, private, educational, or commercial. It's free. + +License notice for Greg Parker +------------------------------ + +Greg Parker gparker@cs.stanford.edu December 2000 +This code is in the public domain and may be copied or modified without +permission. + +License notice for libunwind based code +---------------------------------------- + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License notice for Printing Floating-Point Numbers (Dragon4) +------------------------------------------------------------ + +/****************************************************************************** + Copyright (c) 2014 Ryan Juckett + http://www.ryanjuckett.com/ + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +******************************************************************************/ + +License notice for Printing Floating-point Numbers (Grisu3) +----------------------------------------------------------- + +Copyright 2012 the V8 project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License notice for xxHash +------------------------- + +xxHash - Extremely Fast Hash algorithm +Header File +Copyright (C) 2012-2021 Yann Collet + +BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +You can contact the author at: + - xxHash homepage: https://www.xxhash.com + - xxHash source repository: https://github.com/Cyan4973/xxHash + +License notice for Berkeley SoftFloat Release 3e +------------------------------------------------ + +https://github.com/ucb-bar/berkeley-softfloat-3 +https://github.com/ucb-bar/berkeley-softfloat-3/blob/master/COPYING.txt + +License for Berkeley SoftFloat Release 3e + +John R. Hauser +2018 January 20 + +The following applies to the whole of SoftFloat Release 3e as well as to +each source file individually. + +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the +University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License notice for xoshiro RNGs +-------------------------------- + +Written in 2018 by David Blackman and Sebastiano Vigna (vigna@acm.org) + +To the extent possible under law, the author has dedicated all copyright +and related and neighboring rights to this software to the public domain +worldwide. This software is distributed without any warranty. + +See . + +License for fastmod (https://github.com/lemire/fastmod), ibm-fpgen (https://github.com/nigeltao/parse-number-fxx-test-data) and fastrange (https://github.com/lemire/fastrange) +-------------------------------------- + + Copyright 2018 Daniel Lemire + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +License for sse4-strstr (https://github.com/WojciechMula/sse4-strstr) +-------------------------------------- + + Copyright (c) 2008-2016, Wojciech Mula + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License notice for The C++ REST SDK +----------------------------------- + +C++ REST SDK + +The MIT License (MIT) + +Copyright (c) Microsoft Corporation + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +License notice for MessagePack-CSharp +------------------------------------- + +MessagePack for C# + +MIT License + +Copyright (c) 2017 Yoshifumi Kawai + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +License notice for lz4net +------------------------------------- + +lz4net + +Copyright (c) 2013-2017, Milosz Krajewski + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License notice for Nerdbank.Streams +----------------------------------- + +The MIT License (MIT) + +Copyright (c) Andrew Arnott + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +License notice for RapidJSON +---------------------------- + +Tencent is pleased to support the open source community by making RapidJSON available. + +Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. + +Licensed under the MIT License (the "License"); you may not use this file except +in compliance with the License. You may obtain a copy of the License at + +http://opensource.org/licenses/MIT + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +License notice for DirectX Math Library +--------------------------------------- + +https://github.com/microsoft/DirectXMath/blob/master/LICENSE + + The MIT License (MIT) + +Copyright (c) 2011-2020 Microsoft Corp + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License notice for ldap4net +--------------------------- + +The MIT License (MIT) + +Copyright (c) 2018 Alexander Chermyanin + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License notice for vectorized sorting code +------------------------------------------ + +MIT License + +Copyright (c) 2020 Dan Shechter + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +License notice for musl +----------------------- + +musl as a whole is licensed under the following standard MIT license: + +Copyright © 2005-2020 Rich Felker, et al. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +License notice for "Faster Unsigned Division by Constants" +------------------------------ + +Reference implementations of computing and using the "magic number" approach to dividing +by constants, including codegen instructions. The unsigned division incorporates the +"round down" optimization per ridiculous_fish. + +This is free and unencumbered software. Any copyright is dedicated to the Public Domain. + + +License notice for mimalloc +----------------------------------- + +MIT License + +Copyright (c) 2019 Microsoft Corporation, Daan Leijen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +License for remote stack unwind (https://github.com/llvm/llvm-project/blob/main/lldb/source/Symbol/CompactUnwindInfo.cpp) +-------------------------------------- + +Copyright 2019 LLVM Project + +Licensed under the Apache License, Version 2.0 (the "License") with LLVM Exceptions; +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +https://llvm.org/LICENSE.txt + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +License notice for Apple header files +------------------------------------- + +Copyright (c) 1980, 1986, 1993 + The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +License notice for JavaScript queues +------------------------------------- + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. + +Statement of Purpose +The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). +Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. +For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: +the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; +moral rights retained by the original author(s) and/or performer(s); +publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; +rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; +rights protecting the extraction, dissemination, use and reuse of data in a Work; +database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and +other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. +2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. +3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. +4. Limitations and Disclaimers. +a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. +b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. +c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. +d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. + + +License notice for FastFloat algorithm +------------------------------------- +MIT License +Copyright (c) 2021 csFastFloat authors +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +License notice for MsQuic +-------------------------------------- + +Copyright (c) Microsoft Corporation. +Licensed under the MIT License. + +Available at +https://github.com/microsoft/msquic/blob/main/LICENSE + +License notice for m-ou-se/floatconv +------------------------------- + +Copyright (c) 2020 Mara Bos +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License notice for code from The Practice of Programming +------------------------------- + +Copyright (C) 1999 Lucent Technologies + +Excerpted from 'The Practice of Programming +by Brian W. Kernighan and Rob Pike + +You may use this code for any purpose, as long as you leave the copyright notice and book citation attached. + +Notice for Euclidean Affine Functions and Applications to Calendar +Algorithms +------------------------------- + +Aspects of Date/Time processing based on algorithm described in "Euclidean Affine Functions and Applications to Calendar +Algorithms", Cassio Neri and Lorenz Schneider. https://arxiv.org/pdf/2102.06959.pdf + +License notice for amd/aocl-libm-ose +------------------------------- + +Copyright (C) 2008-2020 Advanced Micro Devices, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +License notice for fmtlib/fmt +------------------------------- + +Formatting library for C++ + +Copyright (c) 2012 - present, Victor Zverovich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License for Jb Evain +--------------------- + +Copyright (c) 2006 Jb Evain (jbevain@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- Optional exception to the license --- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into a machine-executable object form of such +source code, you may redistribute such embedded portions in such object form +without including the above copyright and permission notices. + + +License for MurmurHash3 +-------------------------------------- + +https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp + +MurmurHash3 was written by Austin Appleby, and is placed in the public +domain. The author hereby disclaims copyright to this source + +License for Fast CRC Computation +-------------------------------------- + +https://github.com/intel/isa-l/blob/33a2d9484595c2d6516c920ce39a694c144ddf69/crc/crc32_ieee_by4.asm +https://github.com/intel/isa-l/blob/33a2d9484595c2d6516c920ce39a694c144ddf69/crc/crc64_ecma_norm_by8.asm + +Copyright(c) 2011-2015 Intel Corporation All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License for C# Implementation of Fast CRC Computation +----------------------------------------------------- + +https://github.com/SixLabors/ImageSharp/blob/f4f689ce67ecbcc35cebddba5aacb603e6d1068a/src/ImageSharp/Formats/Png/Zlib/Crc32.cs + +Copyright (c) Six Labors. +Licensed under the Apache License, Version 2.0. + +Available at +https://github.com/SixLabors/ImageSharp/blob/f4f689ce67ecbcc35cebddba5aacb603e6d1068a/LICENSE + +License for the Teddy multi-substring searching implementation +-------------------------------------- + +https://github.com/BurntSushi/aho-corasick + +The MIT License (MIT) + +Copyright (c) 2015 Andrew Gallant + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +License notice for Avx512Vbmi base64 encoding / decoding +-------------------------------------------------------- + +Copyright (c) 2015-2018, Wojciech Muła +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -In the event that we accidentally failed to list a required notice, please -bring it to our attention. Post an issue or email us: +-------------------------------------------------------- - dotnet@microsoft.com +Aspects of base64 encoding / decoding are based on algorithm described in "Base64 encoding and decoding at almost the speed of a memory +copy", Wojciech Muła and Daniel Lemire. https://arxiv.org/pdf/1910.05109.pdf -The attached notices are provided for information only. +License for FormatJS Intl.Segmenter grapheme segmentation algorithm +-------------------------------------------------------------------------- +Available at https://github.com/formatjs/formatjs/blob/58d6a7b398d776ca3d2726d72ae1573b65cc3bef/packages/intl-segmenter/LICENSE.md -License notice for RFC 3492 ---------------------------- +MIT License -The punycode implementation is based on the sample code in RFC 3492 - -Copyright (C) The Internet Society (2003). All Rights Reserved. +Copyright (c) 2022 FormatJS -This document and translations of it may be copied and furnished to -others, and derivative works that comment on or otherwise explain it -or assist in its implementation may be prepared, copied, published -and distributed, in whole or in part, without restriction of any -kind, provided that the above copyright notice and this paragraph are -included on all such copies and derivative works. However, this -document itself may not be modified in any way, such as by removing -the copyright notice or references to the Internet Society or other -Internet organizations, except as needed for the purpose of -developing Internet standards in which case the procedures for -copyrights defined in the Internet Standards process must be -followed, or as required to translate it into languages other than -English. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The limited permissions granted above are perpetual and will not be -revoked by the Internet Society or its successors or assigns. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -This document and the information contained herein is provided on an -"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING -TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING -BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION -HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License notice for Algorithm from Internet Draft document "UUIDs and GUIDs" ---------------------------------------------------------------------------- +License for SharpFuzz and related samples +-------------------------------------- -Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & -Digital Equipment Corporation, Maynard, Mass. -To anyone who acknowledges that this file is provided "AS IS" -without any express or implied warranty: permission to use, copy, -modify, and distribute this file for any purpose is hereby -granted without fee, provided that the above copyright notices and -this notice appears in all source code copies, and that none of -the names of Open Software Foundation, Inc., Hewlett-Packard -Company, or Digital Equipment Corporation be used in advertising -or publicity pertaining to distribution of the software without -specific, written prior permission. Neither Open Software -Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital Equipment -Corporation makes any representations about the suitability of -this software for any purpose. +https://github.com/Metalnem/sharpfuzz +https://github.com/Metalnem/dotnet-fuzzers +https://github.com/Metalnem/libfuzzer-dotnet -Copyright(C) The Internet Society 1997. All Rights Reserved. +MIT License -This document and translations of it may be copied and furnished to others, -and derivative works that comment on or otherwise explain it or assist in -its implementation may be prepared, copied, published and distributed, in -whole or in part, without restriction of any kind, provided that the above -copyright notice and this paragraph are included on all such copies and -derivative works.However, this document itself may not be modified in any -way, such as by removing the copyright notice or references to the Internet -Society or other Internet organizations, except as needed for the purpose of -developing Internet standards in which case the procedures for copyrights -defined in the Internet Standards process must be followed, or as required -to translate it into languages other than English. +Copyright (c) 2018 Nemanja Mijailovic -The limited permissions granted above are perpetual and will not be revoked -by the Internet Society or its successors or assigns. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -This document and the information contained herein is provided on an "AS IS" -basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE -DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO -ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY -RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A -PARTICULAR PURPOSE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -License notice for Algorithm from RFC 4122 - -A Universally Unique IDentifier (UUID) URN Namespace ----------------------------------------------------- +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & -Digital Equipment Corporation, Maynard, Mass. -Copyright (c) 1998 Microsoft. -To anyone who acknowledges that this file is provided "AS IS" -without any express or implied warranty: permission to use, copy, -modify, and distribute this file for any purpose is hereby -granted without fee, provided that the above copyright notices and -this notice appears in all source code copies, and that none of -the names of Open Software Foundation, Inc., Hewlett-Packard -Company, Microsoft, or Digital Equipment Corporation be used in -advertising or publicity pertaining to distribution of the software -without specific, written prior permission. Neither Open Software -Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital -Equipment Corporation makes any representations about the -suitability of this software for any purpose." +License for National Institute of Standards and Technology ACVP Data +-------------------------------------------------------------------- +Available at https://github.com/usnistgov/ACVP-Server/blob/85f8742965b2691862079172982683757d8d91db/README.md#License -License notice for The LLVM Compiler Infrastructure ---------------------------------------------------- +NIST-developed software is provided by NIST as a public service. You may use, copy, and distribute copies of the software in any medium, provided that you keep intact this entire notice. You may improve, modify, and create derivative works of the software or any portion of the software, and you may copy and distribute such modifications or works. Modified works should carry a notice stating that you changed the software and should note the date and nature of any such change. Please explicitly acknowledge the National Institute of Standards and Technology as the source of the software. -Developed by: +NIST-developed software is expressly provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED, IN FACT, OR ARISING BY OPERATION OF LAW, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND DATA ACCURACY. NIST NEITHER REPRESENTS NOR WARRANTS THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ANY DEFECTS WILL BE CORRECTED. NIST DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF THE SOFTWARE OR THE RESULTS THEREOF, INCLUDING BUT NOT LIMITED TO THE CORRECTNESS, ACCURACY, RELIABILITY, OR USEFULNESS OF THE SOFTWARE. - LLVM Team +You are solely responsible for determining the appropriateness of using and distributing the software and you assume all risks associated with its use, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and the unavailability or interruption of operation. This software is not intended to be used in any situation where a failure could cause risk of injury or damage to property. The software developed by NIST employees is not subject to copyright protection within the United States. - University of Illinois at Urbana-Champaign - http://llvm.org +--------------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: +Azure.Core 1.44.1 - LicenseRef-scancode-generic-cla AND MIT - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. +(c) Microsoft Corporation - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. +LicenseRef-scancode-generic-cla AND MIT -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. +--------------------------------------------------------- -License notice for Bit Twiddling Hacks --------------------------------------- +--------------------------------------------------------- -Bit Twiddling Hacks +Azure.Identity 1.13.2 - LicenseRef-scancode-generic-cla AND MIT -By Sean Eron Anderson -seander@cs.stanford.edu -Individually, the code snippets here are in the public domain (unless otherwise -noted) — feel free to use them however you please. The aggregate collection and -descriptions are © 1997-2005 Sean Eron Anderson. The code and descriptions are -distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY and -without even the implied warranty of merchantability or fitness for a particular -purpose. +(c) Microsoft Corporation -License notice for Bob Jenkins ------------------------------- +LicenseRef-scancode-generic-cla AND MIT -By Bob Jenkins, 1996. bob_jenkins@burtleburtle.net. You may use this -code any way you wish, private, educational, or commercial. It's free. +--------------------------------------------------------- -License notice for Greg Parker ------------------------------- +--------------------------------------------------------- -Greg Parker gparker@cs.stanford.edu December 2000 -This code is in the public domain and may be copied or modified without -permission. +Microsoft.Identity.Client 4.67.2 - MIT -License notice for libunwind8 based code ----------------------------------------- -Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. - Contributed by David Mosberger-Tang +(c) Microsoft Corporation +Copyright (c) Microsoft Corporation -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +MIT License -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Copyright (c) -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -License notice for the Printing Floating-Point Numbers -/****************************************************************************** - Copyright (c) 2014 Ryan Juckett - http://www.ryanjuckett.com/ - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -******************************************************************************/ +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -License notice for xxHash -------------------------- +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -xxHash Library -Copyright (c) 2012-2014, Yann Collet -All rights reserved. +--------------------------------------------------------- -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +--------------------------------------------------------- -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. +Microsoft.Identity.Client.Extensions.Msal 4.61.3 - MIT -* Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(c) Microsoft Corporation + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------------------------- + +--------------------------------------------------------- + +Microsoft.Identity.Client.Extensions.Msal 4.67.2 - MIT + + +(c) Microsoft Corporation +Copyright (c) Microsoft Corporation + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------------------------- + +--------------------------------------------------------- + +NETStandard.Library 2.0.3 - MIT + + +copyright Unmanaged32Bit Required32Bit +Copyright (c) .NET Foundation and Contributors + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +--------------------------------------------------------- License notice for code from Microsoft/PerfView: ------------------------------------------------- @@ -325,21 +1606,21 @@ DEALINGS IN THE SOFTWARE. --------------------------------------------------------------- License notice for code based on https://github.com/projectkudu - + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ - + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - + 1. Definitions. - + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, @@ -347,24 +1628,24 @@ License notice for code based on https://github.com/projectkudu direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications @@ -372,7 +1653,7 @@ License notice for code based on https://github.com/projectkudu of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally @@ -386,18 +1667,18 @@ License notice for code based on https://github.com/projectkudu Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable @@ -413,24 +1694,24 @@ License notice for code based on https://github.com/projectkudu or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and - + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and - + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained @@ -447,14 +1728,14 @@ License notice for code based on https://github.com/projectkudu or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of @@ -462,12 +1743,12 @@ License notice for code based on https://github.com/projectkudu Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, @@ -477,7 +1758,7 @@ License notice for code based on https://github.com/projectkudu PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly @@ -489,7 +1770,7 @@ License notice for code based on https://github.com/projectkudu work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, @@ -500,5 +1781,5 @@ License notice for code based on https://github.com/projectkudu defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - + END OF TERMS AND CONDITIONS diff --git a/src/Tools/Directory.Build.props b/src/Tools/Directory.Build.props index e5931b9e3d..11dfc229d6 100644 --- a/src/Tools/Directory.Build.props +++ b/src/Tools/Directory.Build.props @@ -28,4 +28,11 @@ + + + + From 56f5c8f69e5673741d15e8c07448e1c9ccf20d32 Mon Sep 17 00:00:00 2001 From: Johan Lorensson Date: Thu, 10 Jul 2025 09:05:32 +0200 Subject: [PATCH 16/26] Improve Ctrl+C support in dotnet-trace tool (#5519) Changing the cmd line tooling implementation in the following commit: https://github.com/dotnet/diagnostics/commit/6837b8f319b08a458142605bcac76aff4e5af00a#diff-d33d6d23aba37ebcfc05462b2fa260136a11df1b03f129f1912a856c36a8d7f3 broke Ctrl+C handling in dotnet-trace, since it disabled the process termination handler leading to process termination without being able to close the session, creating a corrupt file. dotnet-trace and dotnet-dsrouter tooling needs better control of its Ctrl+C shutdown, so this commit implements a custom process termination handler and disable the default handler implemented by the cmd line tools. This handler makes sure to signal a cancelation token if one of the configured signals hits the process. This commit also fix an issue with the integrated execution of dsrouter from other tools. Since Ctrl+C gets passed to child processes, integrated dsrouter could stop before dotnet-trace was able to close the session causing corrupt trace file and exception being logged in dotnet-trace. To mitigate this, dsrouter implements a way to block signals only accepting shutdown sequence on redirected stdin and dotnet-trace will launch dsrouter in this mode. This makes the shutdown sequence deterministic making sure dsrouter won't stop before dotnet-trace completed any outstanding trace sessions. --- src/Tools/Common/Commands/Utils.cs | 6 +- src/Tools/Common/DsRouterProcessLauncher.cs | 38 +++++- src/Tools/Common/ProcessTerminationHandler.cs | 110 ++++++++++++++++++ .../ReversedServerHelpers.cs | 16 ++- .../dotnet-dsrouter/ADBTcpRouterFactory.cs | 14 ++- .../DiagnosticsServerRouterCommands.cs | 59 +++++++--- src/Tools/dotnet-dsrouter/Program.cs | 28 +++-- .../dotnet-dsrouter/dotnet-dsrouter.csproj | 1 + .../CommandLine/Commands/CollectCommand.cs | 14 ++- src/Tools/dotnet-trace/Program.cs | 11 +- 10 files changed, 242 insertions(+), 55 deletions(-) create mode 100644 src/Tools/Common/ProcessTerminationHandler.cs diff --git a/src/Tools/Common/Commands/Utils.cs b/src/Tools/Common/Commands/Utils.cs index eb19d9b0bc..9e95f1b1b9 100644 --- a/src/Tools/Common/Commands/Utils.cs +++ b/src/Tools/Common/Commands/Utils.cs @@ -42,9 +42,9 @@ public static int FindProcessIdWithName(string name) // // Returns processId that matches the given dsrouter. // - // dsroutercommand + // dsrouterCommand // processId - public static int LaunchDSRouterProcess(string dsroutercommand) + public static int LaunchDSRouterProcess(string dsrouterCommand) { ConsoleColor currentColor = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Yellow; @@ -52,7 +52,7 @@ public static int LaunchDSRouterProcess(string dsroutercommand) Console.ForegroundColor = currentColor; Console.WriteLine("For finer control over the dotnet-dsrouter options, run it separately and connect to it using -p" + Environment.NewLine); - return DsRouterProcessLauncher.Launcher.Start(dsroutercommand, default); + return DsRouterProcessLauncher.Launcher.Start(dsrouterCommand, default); } diff --git a/src/Tools/Common/DsRouterProcessLauncher.cs b/src/Tools/Common/DsRouterProcessLauncher.cs index 4c0f654e35..b62685c06e 100644 --- a/src/Tools/Common/DsRouterProcessLauncher.cs +++ b/src/Tools/Common/DsRouterProcessLauncher.cs @@ -36,7 +36,7 @@ private static async Task ReadAndIgnoreAllStreamAsync(StreamReader streamToIgnor private Process ChildProc => _childProc; - public int Start(string dsroutercommand, CancellationToken ct) + public int Start(string dsrouterCommand, CancellationToken ct) { string toolsRoot = System.IO.Path.GetDirectoryName(System.Environment.ProcessPath); string dotnetDsrouterTool = "dotnet-dsrouter"; @@ -46,10 +46,13 @@ public int Start(string dsroutercommand, CancellationToken ct) dotnetDsrouterTool = Path.Combine(toolsRoot, dotnetDsrouterTool); } + // Block SIGINT and SIGQUIT in child process. + dsrouterCommand += " --block-signals SIGINT;SIGQUIT"; + _childProc = new Process(); _childProc.StartInfo.FileName = dotnetDsrouterTool; - _childProc.StartInfo.Arguments = dsroutercommand; + _childProc.StartInfo.Arguments = dsrouterCommand; _childProc.StartInfo.UseShellExecute = false; _childProc.StartInfo.RedirectStandardOutput = true; _childProc.StartInfo.RedirectStandardError = true; @@ -78,12 +81,37 @@ public void Cleanup() { try { - _childProc.Kill(); + _childProc.StandardInput.WriteLine("Q"); + _childProc.StandardInput.Flush(); + + _childProc.WaitForExit(1000); + } + // if process exited while we were trying to write to stdin, it can throw IOException + catch (IOException) { } + + try + { + if (!_childProc.HasExited) + { + _childProc.Kill(); + } } // if process exited while we were trying to kill it, it can throw IOE catch (InvalidOperationException) { } - _stdOutTask.Wait(); - _stdErrTask.Wait(); + + try + { + _stdOutTask.Wait(); + } + // Ignore any fault/cancel state of task. + catch (AggregateException) { } + + try + { + _stdErrTask.Wait(); + } + // Ignore any fault/cancel state of task. + catch (AggregateException) { } } } } diff --git a/src/Tools/Common/ProcessTerminationHandler.cs b/src/Tools/Common/ProcessTerminationHandler.cs new file mode 100644 index 0000000000..b5eb515f74 --- /dev/null +++ b/src/Tools/Common/ProcessTerminationHandler.cs @@ -0,0 +1,110 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.CommandLine; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.Internal.Common.Utils +{ + internal sealed class ProcessTerminationHandler : IDisposable + { + private bool _isDisposed; + private CancellationTokenSource _cancellationTokenSource; + private readonly PosixSignalRegistration _sigIntRegistration; + private readonly PosixSignalRegistration _sigQuitRegistration; + private readonly PosixSignalRegistration _sigTermRegistration; + private bool _blockSIGINT; + private bool _blockSIGTERM; + private bool _blockSIGQUIT; + + internal CancellationToken GetToken => _cancellationTokenSource.Token; + + internal static async Task InvokeAsync(ParseResult parseResult, string blockedSignals = "") + { + using ProcessTerminationHandler terminationHandler = ConfigureTerminationHandler(parseResult, blockedSignals); + return await parseResult.InvokeAsync(terminationHandler.GetToken).ConfigureAwait(false); + } + + private static ProcessTerminationHandler ConfigureTerminationHandler(ParseResult parseResult, string blockedSignals) + { + // Use custom process terminate handler for the command line tool parse result. + parseResult.Configuration.ProcessTerminationTimeout = null; + return new ProcessTerminationHandler(blockedSignals); + } + + private ProcessTerminationHandler(string blockedSignals) + { + _cancellationTokenSource = new(); + + if (!string.IsNullOrEmpty(blockedSignals)) + { + foreach (string signal in blockedSignals.Split(';')) + { + if (signal.Equals("SIGINT", StringComparison.InvariantCultureIgnoreCase)) + { + _blockSIGINT = true; + } + else if (signal.Equals("SIGQUIT", StringComparison.InvariantCultureIgnoreCase)) + { + _blockSIGQUIT = true; + } + else if (signal.Equals("SIGTERM", StringComparison.InvariantCultureIgnoreCase)) + { + _blockSIGTERM = true; + } + } + } + + _sigIntRegistration = PosixSignalRegistration.Create(PosixSignal.SIGINT, OnPosixSignal); + _sigQuitRegistration = PosixSignalRegistration.Create(PosixSignal.SIGQUIT, OnPosixSignal); + _sigTermRegistration = PosixSignalRegistration.Create(PosixSignal.SIGTERM, OnPosixSignal); + } + + public void Dispose() + { + if (!_isDisposed) + { + _sigIntRegistration?.Dispose(); + _sigQuitRegistration?.Dispose(); + _sigTermRegistration?.Dispose(); + + GC.SuppressFinalize(this); + } + + _isDisposed = true; + } + + private void OnPosixSignal(PosixSignalContext context) + { + context.Cancel = true; + + if (_blockSIGINT && context.Signal == PosixSignal.SIGINT) + { + return; + } + else if (_blockSIGQUIT && context.Signal == PosixSignal.SIGQUIT) + { + return; + } + else if (_blockSIGTERM && context.Signal == PosixSignal.SIGTERM) + { + return; + } + + Cancel(); + } + + private void Cancel() + { + if (_cancellationTokenSource.IsCancellationRequested) + { + return; + } + + _cancellationTokenSource.Cancel(); + } + } +} diff --git a/src/Tools/Common/ReversedServerHelpers/ReversedServerHelpers.cs b/src/Tools/Common/ReversedServerHelpers/ReversedServerHelpers.cs index d3ab7a21bc..b51f0cb130 100644 --- a/src/Tools/Common/ReversedServerHelpers/ReversedServerHelpers.cs +++ b/src/Tools/Common/ReversedServerHelpers/ReversedServerHelpers.cs @@ -128,8 +128,20 @@ public void Cleanup() } // if process exited while we were trying to kill it, it can throw IOE catch (InvalidOperationException) { } - _stdOutTask.Wait(); - _stdErrTask.Wait(); + + try + { + _stdOutTask.Wait(); + } + // Ignore any fault/cancel state of task. + catch (AggregateException) { } + + try + { + _stdErrTask.Wait(); + } + // Ignore any fault/cancel state of task. + catch (AggregateException) { } } } } diff --git a/src/Tools/dotnet-dsrouter/ADBTcpRouterFactory.cs b/src/Tools/dotnet-dsrouter/ADBTcpRouterFactory.cs index 4cb9284ead..c96ddcc257 100644 --- a/src/Tools/dotnet-dsrouter/ADBTcpRouterFactory.cs +++ b/src/Tools/dotnet-dsrouter/ADBTcpRouterFactory.cs @@ -194,8 +194,11 @@ public override async Task Stop() try { - _portReverseTaskCancelToken.Cancel(); - await _portReverseTask.ConfigureAwait(false); + if (_portReverseTaskCancelToken is not null && _portReverseTask is not null) + { + _portReverseTaskCancelToken.Cancel(); + await _portReverseTask.ConfigureAwait(false); + } } catch { } @@ -265,8 +268,11 @@ public override void Stop() { try { - _portForwardTaskCancelToken.Cancel(); - _portForwardTask.Wait(); + if (_portForwardTaskCancelToken is not null && _portForwardTask is not null) + { + _portForwardTaskCancelToken.Cancel(); + _portForwardTask.Wait(); + } } catch { } diff --git a/src/Tools/dotnet-dsrouter/DiagnosticsServerRouterCommands.cs b/src/Tools/dotnet-dsrouter/DiagnosticsServerRouterCommands.cs index 213c801990..f7f64a122f 100644 --- a/src/Tools/dotnet-dsrouter/DiagnosticsServerRouterCommands.cs +++ b/src/Tools/dotnet-dsrouter/DiagnosticsServerRouterCommands.cs @@ -72,6 +72,44 @@ protected SpecificRunnerBase(LogLevel logLevel) LogLevel = logLevel; } + protected static async Task WaitForQuitAsync(CancellationToken token) + { + if (!Console.IsInputRedirected) + { + while (!token.IsCancellationRequested) + { + if (Console.KeyAvailable) + { + ConsoleKey cmd = Console.ReadKey(true).Key; + if (cmd == ConsoleKey.Q) + { + break; + } + } + await Task.Delay(250, token).ConfigureAwait(false); + } + } + else + { + await Task.Run(async() => { + Memory buffer = new char[1]; + while (!token.IsCancellationRequested) + { + int result = await Console.In.ReadAsync(buffer, token).ConfigureAwait(false); + if (result != 0) + { + char key = buffer.Span[0]; + if (key == 'Q' || key == 'q') + { + break; + } + } + await Task.Delay(250, token).ConfigureAwait(false); + } + }, token).ConfigureAwait(false); + } + } + public abstract void ConfigureLauncher(CancellationToken cancellationToken); // The basic run loop: configure logging and the launcher, then create the router and run it until it exits or the user interrupts @@ -91,26 +129,11 @@ public async Task CommonRunLoop(Func routerTask = createRouterTask(logger, Launcher, linkedCancelToken); + Task waitForQuitTask = WaitForQuitAsync(linkedCancelToken.Token); - while (!linkedCancelToken.IsCancellationRequested) + if (!linkedCancelToken.IsCancellationRequested) { - await Task.WhenAny(routerTask, Task.Delay( - 250, - linkedCancelToken.Token)).ConfigureAwait(false); - if (routerTask.IsCompleted) - { - break; - } - - if (!Console.IsInputRedirected && Console.KeyAvailable) - { - ConsoleKey cmd = Console.ReadKey(true).Key; - if (cmd == ConsoleKey.Q) - { - cancelRouterTask.Cancel(); - break; - } - } + await Task.WhenAny(routerTask, waitForQuitTask).ConfigureAwait(false); } if (!routerTask.IsCompleted) diff --git a/src/Tools/dotnet-dsrouter/Program.cs b/src/Tools/dotnet-dsrouter/Program.cs index b5cd886ab7..3738e1b876 100644 --- a/src/Tools/dotnet-dsrouter/Program.cs +++ b/src/Tools/dotnet-dsrouter/Program.cs @@ -20,7 +20,7 @@ private static Command IpcClientTcpServerRouterCommand() "Router is configured using an IPC client (connecting diagnostic tool IPC server) " + "and a TCP/IP server (accepting runtime TCP client).") { - IpcClientAddressOption, TcpServerAddressOption, RuntimeTimeoutOption, VerboseOption, ForwardPortOption + IpcClientAddressOption, TcpServerAddressOption, RuntimeTimeoutOption, VerboseOption, ForwardPortOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcClientTcpServerRouter( @@ -43,7 +43,7 @@ private static Command IpcServerTcpServerRouterCommand() "Router is configured using an IPC server (connecting to by diagnostic tools) " + "and a TCP/IP server (accepting runtime TCP client).") { - IpcServerAddressOption, TcpServerAddressOption, RuntimeTimeoutOption, VerboseOption, ForwardPortOption + IpcServerAddressOption, TcpServerAddressOption, RuntimeTimeoutOption, VerboseOption, ForwardPortOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcServerTcpServerRouter( @@ -66,7 +66,7 @@ private static Command IpcServerTcpClientRouterCommand() "Router is configured using an IPC server (connecting to by diagnostic tools) " + "and a TCP/IP client (connecting runtime TCP server).") { - IpcServerAddressOption, TcpClientAddressOption, RuntimeTimeoutOption, VerboseOption, ForwardPortOption + IpcServerAddressOption, TcpClientAddressOption, RuntimeTimeoutOption, VerboseOption, ForwardPortOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcServerTcpClientRouter( @@ -89,7 +89,7 @@ private static Command IpcServerWebSocketServerRouterCommand() "Router is configured using an IPC server (connecting to by diagnostic tools) " + "and a WebSocket server (accepting runtime WebSocket client).") { - IpcServerAddressOption, WebSocketURLAddressOption, RuntimeTimeoutOption, VerboseOption + IpcServerAddressOption, WebSocketURLAddressOption, RuntimeTimeoutOption, VerboseOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcServerWebSocketServerRouter( @@ -111,7 +111,7 @@ private static Command IpcClientWebSocketServerRouterCommand() "Router is configured using an IPC client (connecting diagnostic tool IPC server) " + "and a WebSocket server (accepting runtime WebSocket client).") { - IpcClientAddressOption, WebSocketURLAddressOption, RuntimeTimeoutOption, VerboseOption + IpcClientAddressOption, WebSocketURLAddressOption, RuntimeTimeoutOption, VerboseOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcClientWebSocketServerRouter( @@ -133,7 +133,7 @@ private static Command IpcClientTcpClientRouterCommand() "Router is configured using an IPC client (connecting diagnostic tool IPC server) " + "and a TCP/IP client (connecting runtime TCP server).") { - IpcClientAddressOption, TcpClientAddressOption, RuntimeTimeoutOption, VerboseOption, ForwardPortOption + IpcClientAddressOption, TcpClientAddressOption, RuntimeTimeoutOption, VerboseOption, ForwardPortOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcClientTcpClientRouter( @@ -156,7 +156,7 @@ private static Command IOSSimulatorRouterCommand() "Router is configured using an IPC server (connecting to by diagnostic tools) " + "and a TCP/IP server (accepting runtime TCP client).") { - RuntimeTimeoutOption, VerboseOption, InfoOption + RuntimeTimeoutOption, VerboseOption, InfoOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcServerIOSSimulatorRouter( @@ -177,7 +177,7 @@ private static Command IOSRouterCommand() "Router is configured using an IPC server (connecting to by diagnostic tools) " + "and a TCP/IP client (connecting runtime TCP server over usbmux).") { - RuntimeTimeoutOption, VerboseOption, InfoOption + RuntimeTimeoutOption, VerboseOption, InfoOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcServerIOSRouter( @@ -198,7 +198,7 @@ private static Command AndroidEmulatorRouterCommand() "Router is configured using an IPC server (connecting to by diagnostic tools) " + "and a TCP/IP server (accepting runtime TCP client).") { - RuntimeTimeoutOption, VerboseOption, InfoOption + RuntimeTimeoutOption, VerboseOption, InfoOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcServerAndroidEmulatorRouter( @@ -218,7 +218,7 @@ private static Command AndroidRouterCommand() "Router is configured using an IPC server (connecting to by diagnostic tools) " + "and a TCP/IP server (accepting runtime TCP client).") { - RuntimeTimeoutOption, VerboseOption, InfoOption + RuntimeTimeoutOption, VerboseOption, InfoOption, BlockedSignalsOption }; command.SetAction((parseResult, ct) => new DiagnosticsServerRouterCommands().RunIpcServerAndroidRouter( @@ -292,6 +292,12 @@ private static Command AndroidRouterCommand() Description = "Enable port forwarding, values Android|iOS for TcpClient and only Android for TcpServer. Make sure to set ANDROID_SDK_ROOT before using this option on Android." }; + private static readonly Option BlockedSignalsOption = + new("--block-signals", "-bsig") + { + Description = "Blocks specified signals, currently SIGINT and SIGQUIT can be disabled, each signal is separated with ;" + }; + private static readonly Option InfoOption = new("--info", "-i") { @@ -330,7 +336,7 @@ private static Task Main(string[] args) Console.ForegroundColor = currentColor; } - return parseResult.InvokeAsync(); + return ProcessTerminationHandler.InvokeAsync(parseResult, parseResult.GetValue(BlockedSignalsOption)); } } } diff --git a/src/Tools/dotnet-dsrouter/dotnet-dsrouter.csproj b/src/Tools/dotnet-dsrouter/dotnet-dsrouter.csproj index 939c3601da..a84ad77b2c 100644 --- a/src/Tools/dotnet-dsrouter/dotnet-dsrouter.csproj +++ b/src/Tools/dotnet-dsrouter/dotnet-dsrouter.csproj @@ -14,6 +14,7 @@ + diff --git a/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs b/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs index cbda63ff98..054a6e83a7 100644 --- a/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs +++ b/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs @@ -280,7 +280,7 @@ private static async Task Collect(CancellationToken ct, CommandLineConfigur try { EventPipeSessionConfiguration config = new(providerCollection, (int)buffersize, rundownKeyword: rundownKeyword, requestStackwalk: true); - session = diagnosticsClient.StartEventPipeSession(config); + session = await diagnosticsClient.StartEventPipeSessionAsync(config, ct).ConfigureAwait(false); } catch (UnsupportedCommandException e) { @@ -298,7 +298,7 @@ private static async Task Collect(CancellationToken ct, CommandLineConfigur // Debug.Assert(rundownKeyword != EventPipeSession.DefaultRundownKeyword); // EventPipeSessionConfiguration config = new(providerCollection, (int)buffersize, rundownKeyword: EventPipeSession.DefaultRundownKeyword, requestStackwalk: true); - session = diagnosticsClient.StartEventPipeSession(config); + session = await diagnosticsClient.StartEventPipeSessionAsync(config, ct).ConfigureAwait(false); } else if (retryStrategy == RetryStrategy.DropKeywordDropRundown) { @@ -314,7 +314,7 @@ private static async Task Collect(CancellationToken ct, CommandLineConfigur // Debug.Assert(rundownKeyword != EventPipeSession.DefaultRundownKeyword); // EventPipeSessionConfiguration config = new(providerCollection, (int)buffersize, rundownKeyword: 0, requestStackwalk: true); - session = diagnosticsClient.StartEventPipeSession(config); + session = await diagnosticsClient.StartEventPipeSessionAsync(config, ct).ConfigureAwait(false); } else { @@ -331,7 +331,7 @@ private static async Task Collect(CancellationToken ct, CommandLineConfigur { try { - diagnosticsClient.ResumeRuntime(); + await diagnosticsClient.ResumeRuntimeAsync(ct).ConfigureAwait(false); } catch (UnsupportedCommandException) { @@ -489,6 +489,12 @@ private static async Task Collect(CancellationToken ct, CommandLineConfigur collectionStopped = true; ret = (int)ReturnCode.TracingError; } + catch (OperationCanceledException) + { + ConsoleWriteLine("\nTrace collection canceled."); + collectionStopped = true; + ret = (int)ReturnCode.TracingError; + } catch (Exception ex) { Console.Error.WriteLine($"[ERROR] {ex}"); diff --git a/src/Tools/dotnet-trace/Program.cs b/src/Tools/dotnet-trace/Program.cs index 41f34c1580..69c3cff0be 100644 --- a/src/Tools/dotnet-trace/Program.cs +++ b/src/Tools/dotnet-trace/Program.cs @@ -24,13 +24,7 @@ public static Task Main(string[] args) ReportCommandHandler.ReportCommand() }; - CommandLineConfiguration configuration = new(rootCommand) - { - // System.CommandLine should not interfere with Ctrl+C - ProcessTerminationTimeout = null - }; - - ParseResult parseResult = rootCommand.Parse(args, configuration); + ParseResult parseResult = rootCommand.Parse(args); string parsedCommandName = parseResult.CommandResult.Command.Name; if (parsedCommandName == "collect") { @@ -41,7 +35,8 @@ public static Task Main(string[] args) ProcessLauncher.Launcher.PrepareChildProcess(args); } } - return parseResult.InvokeAsync(); + + return ProcessTerminationHandler.InvokeAsync(parseResult); } } } From 7d70948126274735f24d6f7feb6d879a155aa803 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 03:18:57 +0000 Subject: [PATCH 17/26] [main] Update dependencies from microsoft/clrmd (#5521) [main] Update dependencies from microsoft/clrmd --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3548bfe0f4..dbff6546d3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,13 +1,13 @@ - + https://github.com/microsoft/clrmd - fd6ccca33b888a5077a477218cac2461b81e8586 + d724947392626b66e39b525998a8817447d50380 - + https://github.com/microsoft/clrmd - fd6ccca33b888a5077a477218cac2461b81e8586 + d724947392626b66e39b525998a8817447d50380 diff --git a/eng/Versions.props b/eng/Versions.props index 1c0d54f131..bfbf9ec205 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,7 +40,7 @@ 8.0.0 6.0.0 - 4.0.0-beta.25261.1 + 4.0.0-beta.25359.1 17.10.0-beta1.24272.1 3.1.21 6.0.0 From c3c57bbd7ce6950087b2e99be7a1a1170cf94923 Mon Sep 17 00:00:00 2001 From: Max Charlamb <44248479+max-charlamb@users.noreply.github.com> Date: Sat, 12 Jul 2025 14:29:49 -0400 Subject: [PATCH 18/26] Fix possible COM leak (#5522) --- src/SOS/Strike/strike.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/SOS/Strike/strike.cpp b/src/SOS/Strike/strike.cpp index 4dab0bd56c..2c86da4f21 100644 --- a/src/SOS/Strike/strike.cpp +++ b/src/SOS/Strike/strike.cpp @@ -11278,7 +11278,6 @@ class ClrStackImpl static void PrintArgsAndLocals(IXCLRDataStackWalk *pStackWalk, BOOL bArgs, BOOL bLocals) { ToRelease pFrame; - ToRelease pVal; ULONG32 argCount = 0; ULONG32 localCount = 0; HRESULT hr = S_OK; @@ -11290,14 +11289,14 @@ class ClrStackImpl hr = pFrame->GetNumArguments(&argCount); if (SUCCEEDED(hr) && bArgs) - hr = ShowArgs(argCount, pFrame, pVal); + hr = ShowArgs(argCount, pFrame); // Print locals if (SUCCEEDED(hr) && bLocals) hr = pFrame->GetNumLocalVariables(&localCount); if (SUCCEEDED(hr) && bLocals) - ShowLocals(localCount, pFrame, pVal); + ShowLocals(localCount, pFrame); ExtOut("\n"); } @@ -11308,9 +11307,8 @@ class ClrStackImpl * Params: * argy - the number of arguments the function has * pFramey - the frame we are inspecting - * pVal - a pointer to the CLRDataValue we use to query for info about the args */ - static HRESULT ShowArgs(ULONG32 argy, IXCLRDataFrame *pFramey, IXCLRDataValue *pVal) + static HRESULT ShowArgs(ULONG32 argy, IXCLRDataFrame *pFramey) { CLRDATA_ADDRESS addr = 0; BOOL fPrintedLocation = FALSE; @@ -11332,6 +11330,7 @@ class ClrStackImpl ExtOut(" PARAMETERS:\n"); } + ToRelease pVal; hr = pFramey->GetArgumentByIndex(i, &pVal, mdNameLen, @@ -11413,8 +11412,6 @@ class ClrStackImpl { ExtOut("\n"); } - - pVal->Release(); } return S_OK; @@ -11425,9 +11422,8 @@ class ClrStackImpl * Params: * localy - the number of locals in the frame * pFramey - the frame we are inspecting - * pVal - a pointer to the CLRDataValue we use to query for info about the args */ - static HRESULT ShowLocals(ULONG32 localy, IXCLRDataFrame *pFramey, IXCLRDataValue *pVal) + static HRESULT ShowLocals(ULONG32 localy, IXCLRDataFrame *pFramey) { for (ULONG32 i=0; i < localy; i++) { @@ -11438,6 +11434,7 @@ class ClrStackImpl ExtOut(" "); // local names don't work in Whidbey. + ToRelease pVal; hr = pFramey->GetLocalVariableByIndex(i, &pVal, mdNameLen, NULL, g_mdName); if (FAILED(hr)) { @@ -11506,8 +11503,6 @@ class ClrStackImpl { ExtOut("\n"); } - - pVal->Release(); } return S_OK; From 3d11b96dce35ba8c590ccce46884b2230f177ab6 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 14 Jul 2025 20:04:58 +0000 Subject: [PATCH 19/26] Update Microsoft.Diagnostics.Tracing.TraceEvent to version 3.1.23 to fix P/Invoke buffer handling (#5523) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Updated `MicrosoftDiagnosticsTracingTraceEventVersion` from `3.1.21` to `3.1.23` in `eng/Versions.props` ## Tools Affected This centralized version update automatically applies to all diagnostic tools that use the TraceEvent library: - ✅ `dotnet-stack` (specifically mentioned in the issue) - ✅ `dotnet-gcdump` (specifically mentioned in the issue) - ✅ `dotnet-counters` - ✅ `dotnet-trace` - ✅ `dotnet-dsrouter` Fixes #5508. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: hoyosjs <19413848+hoyosjs@users.noreply.github.com> --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index bfbf9ec205..e972397467 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -42,7 +42,7 @@ 6.0.0 4.0.0-beta.25359.1 17.10.0-beta1.24272.1 - 3.1.21 + 3.1.23 6.0.0 6.0.4 6.0.0 From 220408e4fa71e1f06f80e4804ac31dce5488210e Mon Sep 17 00:00:00 2001 From: Noah Falk Date: Mon, 14 Jul 2025 15:19:22 -0700 Subject: [PATCH 20/26] Change SocketException to ServerNotAvailable + misc test fixes/logging (#5354) This started out as a bit of test logging. Then the unrelated GetProcessInfo test failed in CI so the change grew into a small product fix + more test improvements. Product changes: - Connecting to the IPC channel might fail when the runtime is starting up, shutting down, or is overloaded. If so the socket.Connect() call is going to throw a SocketException. In order to avoid having callers to DiagnosticClient APIs understand all the implrementation details and have to use catch clauses for a wide variety of different exceptions we now catch this exception and rethrow it wrapped as a ServerNotAvailableException. Test changes: - Add logging to the DuplicateMetricNames test to improve diagnostics when it hangs. - Add retries to the GetProcessInfo requests that are running while the target process is starting up. There is no guarantee the runtime is listening to the socket at this point and connection requests may be refused. This may resolve one cause of flakiness noted in https://github.com/dotnet/diagnostics/issues/2760. The issue also shows a 'ReadPastEndOfStream' problem that is not addressed by this fix. - Add verification that the ExePath returned by DebuggeeCompiler actually exists on disk. This catches some build/config issues in the test setup more eagerly. - Add verification that the BuildProjectFramework and TargetConfiguration used by SdkPrebuiltDebuggeeCompiler are populated. This catches some specific test configuration errors more eagerly. - Tweaked some out-of-date comments --------- Co-authored-by: Mitchell Hwang <16830051+mdh1418@users.noreply.github.com> --- eng/InstallRuntimes.proj | 2 +- .../DiagnosticsClientExceptions.cs | 1 + .../DiagnosticsIpc/IpcTransport.cs | 114 ++++++++++-------- .../SdkPrebuiltDebuggeeCompiler.cs | 9 ++ src/tests/CommonTestRunner/TestRunner.cs | 4 + .../EventCounterPipelineUnitTests.cs | 22 +++- .../GetProcessInfoTests.cs | 17 ++- 7 files changed, 115 insertions(+), 54 deletions(-) diff --git a/eng/InstallRuntimes.proj b/eng/InstallRuntimes.proj index 9dbfd87967..7b137bd2d3 100644 --- a/eng/InstallRuntimes.proj +++ b/eng/InstallRuntimes.proj @@ -113,7 +113,7 @@ /// The amount of time to block attempting to connect /// A stream used for writing and reading data to and from the target .NET process + /// ServerNotAvailableException public abstract Stream Connect(TimeSpan timeout); /// @@ -29,6 +31,7 @@ internal abstract class IpcEndpoint /// /// A task that completes with a stream used for writing and reading data to and from the target .NET process. /// + /// ServerNotAvailableException public abstract Task ConnectAsync(CancellationToken token); /// @@ -51,66 +54,81 @@ internal static class IpcEndpointHelper { public static Stream Connect(IpcEndpointConfig config, TimeSpan timeout) { - if (config.Transport == IpcEndpointConfig.TransportType.NamedPipe) - { - NamedPipeClientStream namedPipe = new( - ".", - config.Address, - PipeDirection.InOut, - PipeOptions.None, - TokenImpersonationLevel.Impersonation); - namedPipe.Connect((int)timeout.TotalMilliseconds); - return namedPipe; - } - else if (config.Transport == IpcEndpointConfig.TransportType.UnixDomainSocket) + try { - IpcUnixDomainSocket socket = new(); - socket.Connect(new IpcUnixDomainSocketEndPoint(config.Address), timeout); - return new ExposedSocketNetworkStream(socket, ownsSocket: true); - } + if (config.Transport == IpcEndpointConfig.TransportType.NamedPipe) + { + NamedPipeClientStream namedPipe = new( + ".", + config.Address, + PipeDirection.InOut, + PipeOptions.None, + TokenImpersonationLevel.Impersonation); + namedPipe.Connect((int)timeout.TotalMilliseconds); + return namedPipe; + } + else if (config.Transport == IpcEndpointConfig.TransportType.UnixDomainSocket) + { + IpcUnixDomainSocket socket = new(); + socket.Connect(new IpcUnixDomainSocketEndPoint(config.Address), timeout); + return new ExposedSocketNetworkStream(socket, ownsSocket: true); + } #if DIAGNOSTICS_RUNTIME - else if (config.Transport == IpcEndpointConfig.TransportType.TcpSocket) - { - var tcpClient = new TcpClient (); - var endPoint = new IpcTcpSocketEndPoint(config.Address); - tcpClient.Connect(endPoint.EndPoint); - return tcpClient.GetStream(); - } + else if (config.Transport == IpcEndpointConfig.TransportType.TcpSocket) + { + var tcpClient = new TcpClient (); + var endPoint = new IpcTcpSocketEndPoint(config.Address); + tcpClient.Connect(endPoint.EndPoint); + return tcpClient.GetStream(); + } #endif - else + else + { + throw new ArgumentException($"Unsupported IpcEndpointConfig transport type {config.Transport}"); + } + + } + catch (SocketException ex) { - throw new ArgumentException($"Unsupported IpcEndpointConfig transport type {config.Transport}"); + throw new ServerNotAvailableException($"Unable to connect to the server. {ex.Message}", ex); } } public static async Task ConnectAsync(IpcEndpointConfig config, CancellationToken token) { - if (config.Transport == IpcEndpointConfig.TransportType.NamedPipe) - { - NamedPipeClientStream namedPipe = new( - ".", - config.Address, - PipeDirection.InOut, - PipeOptions.Asynchronous, - TokenImpersonationLevel.Impersonation); - - // Pass non-infinite timeout in order to cause internal connection algorithm - // to check the CancellationToken periodically. Otherwise, if the named pipe - // is waited using WaitNamedPipe with an infinite timeout, then the - // CancellationToken cannot be observed. - await namedPipe.ConnectAsync(int.MaxValue, token).ConfigureAwait(false); - - return namedPipe; - } - else if (config.Transport == IpcEndpointConfig.TransportType.UnixDomainSocket) + try { - IpcUnixDomainSocket socket = new(); - await socket.ConnectAsync(new IpcUnixDomainSocketEndPoint(config.Address), token).ConfigureAwait(false); - return new ExposedSocketNetworkStream(socket, ownsSocket: true); + if (config.Transport == IpcEndpointConfig.TransportType.NamedPipe) + { + NamedPipeClientStream namedPipe = new( + ".", + config.Address, + PipeDirection.InOut, + PipeOptions.Asynchronous, + TokenImpersonationLevel.Impersonation); + + // Pass non-infinite timeout in order to cause internal connection algorithm + // to check the CancellationToken periodically. Otherwise, if the named pipe + // is waited using WaitNamedPipe with an infinite timeout, then the + // CancellationToken cannot be observed. + await namedPipe.ConnectAsync(int.MaxValue, token).ConfigureAwait(false); + + return namedPipe; + } + else if (config.Transport == IpcEndpointConfig.TransportType.UnixDomainSocket) + { + IpcUnixDomainSocket socket = new(); + await socket.ConnectAsync(new IpcUnixDomainSocketEndPoint(config.Address), token).ConfigureAwait(false); + return new ExposedSocketNetworkStream(socket, ownsSocket: true); + } + else + { + throw new ArgumentException($"Unsupported IpcEndpointConfig transport type {config.Transport}"); + } } - else + catch (SocketException ex) { - throw new ArgumentException($"Unsupported IpcEndpointConfig transport type {config.Transport}"); + throw new ServerNotAvailableException($"Unable to connect to the server. {ex.Message}", ex); } } } diff --git a/src/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs b/src/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs index d397dd809e..ebc4105d43 100644 --- a/src/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs +++ b/src/Microsoft.Diagnostics.TestHelpers/SdkPrebuiltDebuggeeCompiler.cs @@ -15,6 +15,15 @@ public class SdkPrebuiltDebuggeeCompiler : IDebuggeeCompiler public SdkPrebuiltDebuggeeCompiler(TestConfiguration config, string debuggeeName) { + if (string.IsNullOrEmpty(config.TargetConfiguration)) + { + throw new System.ArgumentException("TargetConfiguration must be set in the TestConfiguration"); + } + if (string.IsNullOrEmpty(config.BuildProjectFramework)) + { + throw new System.ArgumentException("BuildProjectFramework must be set in the TestConfiguration"); + } + // The layout is how the current .NET Core SDK layouts the binaries out: // Source Path: //[] // Binary Path: /bin/// diff --git a/src/tests/CommonTestRunner/TestRunner.cs b/src/tests/CommonTestRunner/TestRunner.cs index 730dac25d1..47497f6826 100644 --- a/src/tests/CommonTestRunner/TestRunner.cs +++ b/src/tests/CommonTestRunner/TestRunner.cs @@ -49,6 +49,10 @@ public static async Task Create(TestConfiguration config, ITestOutpu // Get the full debuggee launch command line (includes the host if required) string exePath = debuggeeConfig.BinaryExePath; + if (!File.Exists(exePath)) + { + throw new FileNotFoundException($"Expected to find target executable at {exePath} but it didn't exist. Perhaps the path was improperly configured or a build/deployment error caused the file to be missing?"); + } string pipeName = null; StringBuilder arguments = new(); diff --git a/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/EventCounterPipelineUnitTests.cs b/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/EventCounterPipelineUnitTests.cs index 973e2d5a8c..2fb091ea9b 100644 --- a/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/EventCounterPipelineUnitTests.cs +++ b/src/tests/Microsoft.Diagnostics.Monitoring.EventPipe/EventCounterPipelineUnitTests.cs @@ -59,8 +59,9 @@ private sealed class TestMetricsLogger : ICountersLogger private readonly List _expectedCounters = new(); private Dictionary _metrics = new(); private readonly TaskCompletionSource _foundExpectedCountersSource; + private readonly ITestOutputHelper _output; - public TestMetricsLogger(IEnumerable expectedCounters, TaskCompletionSource foundExpectedCountersSource) + public TestMetricsLogger(IEnumerable expectedCounters, TaskCompletionSource foundExpectedCountersSource, ITestOutputHelper output) { _foundExpectedCountersSource = foundExpectedCountersSource; _expectedCounters = new(expectedCounters); @@ -68,6 +69,7 @@ public TestMetricsLogger(IEnumerable expectedCounters, TaskComp { foundExpectedCountersSource.SetResult(null); } + _output = output; } public IEnumerable Metrics => _metrics.Values; @@ -90,17 +92,29 @@ public void Log(ICounterPayload payload) ExpectedCounter expectedCounter = _expectedCounters.Find(c => c.MatchesCounterMetadata(payload.CounterMetadata)); if(expectedCounter != null) { + _expectedCounters.Remove(expectedCounter); _metrics.Add(expectedCounter, payload); + + _output.WriteLine($"Found expected counter: {expectedCounter.ProviderName}/{expectedCounter.CounterName}. Counters remaining={_expectedCounters.Count}"); // Complete the task source if the last expected key was removed. if (_expectedCounters.Count == 0) { + _output.WriteLine($"All expected counters have been received. Signaling pipeline can exit."); _foundExpectedCountersSource.TrySetResult(null); } } + else + { + _output.WriteLine($"Received additional counter event: {payload.CounterMetadata.ProviderName}/{payload.CounterMetadata.CounterName}"); + } } - public Task PipelineStarted(CancellationToken token) => Task.CompletedTask; + public Task PipelineStarted(CancellationToken token) + { + _output.WriteLine("Counters pipeline is running. Waiting to receive expected counters from tracee."); + return Task.CompletedTask; + } public Task PipelineStopped(CancellationToken token) => Task.CompletedTask; } @@ -113,7 +127,7 @@ public async Task TestCounterEventPipeline(TestConfiguration config) TaskCompletionSource foundExpectedCountersSource = new(TaskCreationOptions.RunContinuationsAsynchronously); - TestMetricsLogger logger = new(expectedCounters.Select(name => new ExpectedCounter(expectedProvider, name)), foundExpectedCountersSource); + TestMetricsLogger logger = new(expectedCounters.Select(name => new ExpectedCounter(expectedProvider, name)), foundExpectedCountersSource, _output); await using (TestRunner testRunner = await PipelineTestUtilities.StartProcess(config, "CounterRemoteTest", _output)) { @@ -169,7 +183,7 @@ public async Task TestDuplicateNameMetrics(TestConfiguration config) new ExpectedCounter(providerName, counterName, "MeterTag=two","InstrumentTag=B"), ]; TaskCompletionSource foundExpectedCountersSource = new(TaskCreationOptions.RunContinuationsAsynchronously); - TestMetricsLogger logger = new(expectedCounters, foundExpectedCountersSource); + TestMetricsLogger logger = new(expectedCounters, foundExpectedCountersSource, _output); await using (TestRunner testRunner = await PipelineTestUtilities.StartProcess(config, "DuplicateNameMetrics", _output, testProcessTimeout: 3_000)) { diff --git a/src/tests/Microsoft.Diagnostics.NETCore.Client/GetProcessInfoTests.cs b/src/tests/Microsoft.Diagnostics.NETCore.Client/GetProcessInfoTests.cs index 961ee8123e..7f7181bc47 100644 --- a/src/tests/Microsoft.Diagnostics.NETCore.Client/GetProcessInfoTests.cs +++ b/src/tests/Microsoft.Diagnostics.NETCore.Client/GetProcessInfoTests.cs @@ -74,7 +74,22 @@ private async Task BasicProcessInfoTestCore(TestConfiguration config, bool useAs ProcessInfo processInfoBeforeResume = null; if (suspend) { - processInfoBeforeResume = await clientShim.GetProcessInfo(); + // when the process is just starting up, the IPC channel may not be ready yet. We need to be prepared for the connection attempt to fail. + // If 100 retries over 10 seconds fail then we'll go ahead and fail the test. + const int retryCount = 100; + for (int i = 0; i < retryCount; i++) + { + try + { + processInfoBeforeResume = await clientShim.GetProcessInfo(); + break; + } + catch (ServerNotAvailableException) when (i < retryCount-1) + { + _output.WriteLine($"Failed to connect to the IPC channel as the process is starting up. Attempt {i+1} of {retryCount}. Waiting 0.1 seconds, then retrying."); + await Task.Delay(100); + } + } ValidateProcessInfo(runner.Pid, processInfoBeforeResume); Assert.True((config.RuntimeFrameworkVersionMajor < 8) == string.IsNullOrEmpty(processInfoBeforeResume.ManagedEntrypointAssemblyName)); From 15863918a40fc31d0498ca5f1b8a5f7f7ada113a Mon Sep 17 00:00:00 2001 From: Rachel Date: Tue, 15 Jul 2025 13:01:42 -0700 Subject: [PATCH 21/26] Part 1: adding better diagnostic messages for too-long TMPDIR on Linux (#5517) Closes dotnet/runtime#111165 This PR adds better diagnostic messages in the scenario of too-long TMPDIR values on Linux that cause the diagnostic socket to be absent or incorrectly named. --------- Co-authored-by: Rachel Jarvi Co-authored-by: Noah Falk --- .../DiagnosticsIpc/IpcTransport.cs | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcTransport.cs b/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcTransport.cs index 0f93818458..de15869988 100644 --- a/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcTransport.cs +++ b/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcTransport.cs @@ -239,10 +239,13 @@ internal class PidIpcEndpoint : IpcEndpoint { public static string IpcRootPath { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"\\.\pipe\" : Path.GetTempPath(); public static string DiagnosticsPortPattern { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"^dotnet-diagnostic-(\d+)$" : @"^dotnet-diagnostic-(\d+)-(\d+)-socket$"; - + // Format strings as private const members + private const string _defaultAddressFormatWindows = "dotnet-diagnostic-{0}"; + private const string _dsrouterAddressFormatWindows = "dotnet-diagnostic-dsrouter-{0}"; + private const string _defaultAddressFormatNonWindows = "dotnet-diagnostic-{0}-{1}-socket"; + private const string _dsrouterAddressFormatNonWindows = "dotnet-diagnostic-dsrouter-{0}-{1}-socket"; private int _pid; private IpcEndpointConfig _config; - /// /// Creates a reference to a .NET process's IPC Transport /// using the default rules for a given pid @@ -289,11 +292,11 @@ private static bool TryGetDefaultAddress(int pid, out string defaultAddress) if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - defaultAddress = $"dotnet-diagnostic-{pid}"; + defaultAddress = string.Format(_defaultAddressFormatWindows, pid); try { - string dsrouterAddress = Directory.GetFiles(IpcRootPath, $"dotnet-diagnostic-dsrouter-{pid}").FirstOrDefault(); + string dsrouterAddress = Directory.GetFiles(IpcRootPath, string.Format(_dsrouterAddressFormatWindows, pid)).FirstOrDefault(); if (!string.IsNullOrEmpty(dsrouterAddress)) { defaultAddress = dsrouterAddress; @@ -305,11 +308,11 @@ private static bool TryGetDefaultAddress(int pid, out string defaultAddress) { try { - defaultAddress = Directory.GetFiles(IpcRootPath, $"dotnet-diagnostic-{pid}-*-socket") // Try best match. + defaultAddress = Directory.GetFiles(IpcRootPath, string.Format(_defaultAddressFormatNonWindows, pid, "*")) // Try best match. .OrderByDescending(f => new FileInfo(f).LastWriteTime) .FirstOrDefault(); - string dsrouterAddress = Directory.GetFiles(IpcRootPath, $"dotnet-diagnostic-dsrouter-{pid}-*-socket") // Try best match. + string dsrouterAddress = Directory.GetFiles(IpcRootPath, string.Format(_dsrouterAddressFormatNonWindows, pid, "*")) // Try best match. .OrderByDescending(f => new FileInfo(f).LastWriteTime) .FirstOrDefault(); @@ -350,8 +353,15 @@ public static string GetDefaultAddress(int pid) string msg = $"Unable to connect to Process {pid}."; if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { + int total_length = IpcRootPath.Length + string.Format(_defaultAddressFormatNonWindows, pid, "##########").Length; + if (total_length > 108) // This isn't perfect as we don't know the disambiguation key length. However it should catch most cases. + { + msg += "The total length of the diagnostic socket path may exceed 108 characters. " + + "Try setting the TMPDIR environment variable to a shorter path"; + } msg += $" Please verify that {IpcRootPath} is writable by the current user. " + "If the target process has environment variable TMPDIR set, please set TMPDIR to the same directory. " + + "Please also ensure that the target process has {TMPDIR}/dotnet-diagnostic-{pid}-{disambiguation_key}-socket shorter than 108 characters. " + "Please see https://aka.ms/dotnet-diagnostics-port for more information"; } throw new ServerNotAvailableException(msg); @@ -367,7 +377,7 @@ public static bool IsDefaultAddressDSRouter(int pid, string address) address = address.Substring(IpcRootPath.Length); } - string dsrouterAddress = $"dotnet-diagnostic-dsrouter-{pid}"; + string dsrouterAddress = string.Format(_dsrouterAddressFormatWindows, pid); return address.StartsWith(dsrouterAddress, StringComparison.OrdinalIgnoreCase); } From 4e46ba6fdb5073afb7b03b46e14f619d5ac456fa Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Thu, 17 Jul 2025 03:49:46 -0700 Subject: [PATCH 22/26] Consume cDac package and other cleanup (#5482) Create a InstallNativePackages.proj that downloads the native diasymreader and cdac packages. Note that cdac packages are opt in via `PackageWithCDac`. Add InstallNativePackages to native-prereqs.proj Move the native binary copies out of the build.sh/build-native.cmd scripts to the appropriate managed project Move the rest of the binary copying from the cmake files to the managed projects Switch the Windows native builds to use ninja. Add the -msbuild/-ninja build-native.cmd options. --------- Co-authored-by: Mike McLaughlin Co-authored-by: Steve Pfister --- CMakeLists.txt | 4 + Directory.Build.props | 30 +++++++ eng/Build-Native.cmd | 45 ++++------ eng/CdacPackageItems.props | 24 +++++ eng/Directory.Build.props | 3 +- eng/InstallNativePackages.targets | 38 ++++++++ eng/InstallRuntimes.proj | 11 ++- eng/Version.Details.xml | 24 +++++ eng/Versions.props | 8 ++ eng/build.ps1 | 24 +++-- eng/build.sh | 88 +++++++++---------- eng/native-prereqs.proj | 9 +- eng/native/configurecompiler.cmake | 2 + eng/pipelines/build.yml | 1 + eng/pipelines/global-variables.yml | 1 + src/Directory.Build.props | 4 +- src/SOS/CMakeLists.txt | 1 - src/SOS/SOS.Extensions/CMakeLists.txt | 21 ----- src/SOS/SOS.Extensions/SOS.Extensions.csproj | 12 ++- .../Debuggees/DesktopClrHost/CMakeLists.txt | 9 +- .../Debuggees/WebApp3/WebApp3.csproj | 10 +++ src/Tools/dotnet-dump/dotnet-dump.csproj | 4 +- src/Tools/dotnet-sos/dotnet-sos.csproj | 18 ++-- src/sos-packaging.props | 54 +++++++----- src/sos-packaging.targets | 14 +++ src/tests/Directory.Build.props | 6 -- 26 files changed, 306 insertions(+), 159 deletions(-) create mode 100644 eng/CdacPackageItems.props create mode 100644 eng/InstallNativePackages.targets delete mode 100644 src/SOS/SOS.Extensions/CMakeLists.txt create mode 100644 src/sos-packaging.targets diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fd7f9370f..882f5b3e05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,10 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default. +if(POLICY CMP0177) + cmake_policy(SET CMP0177 NEW) # install() paths are normalized +endif(POLICY CMP0177) + # Set the project name project(diagnostics) diff --git a/Directory.Build.props b/Directory.Build.props index 7b25fe55b3..10415c69c4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -21,6 +21,35 @@ diagnostics + + + + + + linux + Windows_NT + linux + osx + + + + $(Platform) + $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', '$(TargetOS).$(TargetArch).$(Configuration)')) + + + + $(TargetOS) + win + $(TargetRidOS)-$(TargetArch) + + net462 net8.0 + diff --git a/eng/Build-Native.cmd b/eng/Build-Native.cmd index fead091366..c6349242c7 100644 --- a/eng/Build-Native.cmd +++ b/eng/Build-Native.cmd @@ -21,7 +21,7 @@ set __TargetOS=Windows_NT set __BuildNative=1 set __CI=0 set __Verbosity=minimal -set __Ninja=0 +set __Ninja=1 :: Set the various build properties here so that CMake and MSBuild can pick them up set "__RepoRootDir=%~dp0" @@ -46,6 +46,8 @@ if /i "%1" == "--help" goto Usage if /i "%1" == "-configuration" (set __BuildType=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop) if /i "%1" == "-architecture" (set __TargetArch=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop) if /i "%1" == "-verbosity" (set __Verbosity=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop) +if /i "%1" == "-msbuild" (set __Ninja=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-ninja" (set __Ninja=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-ci" (set __CI=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) :: These options are ignored for a native build @@ -105,7 +107,7 @@ set "__CMakeBinDir=%__BinDir%" set "__CMakeBinDir=%__CMakeBinDir:\=/%" :: Common msbuild arguments -set "__CommonBuildArgs=/v:!__Verbosity! /p:Configuration=%__BuildType% /p:BuildArch=%__TargetArch% %__UnprocessedBuildArgs%" +set "__CommonBuildArgs=/v:!__Verbosity! /p:Configuration=%__BuildType% /p:TargetOS=%__TargetOS% /p:TargetArch=%__TargetArch% %__UnprocessedBuildArgs%" if not exist "%__BinDir%" md "%__BinDir%" if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%" @@ -162,13 +164,9 @@ if %__BuildNative% EQU 1 ( goto ExitWithError ) - if %__Ninja% EQU 1 ( - set __ExtraCmakeArgs="-DCMAKE_BUILD_TYPE=!__BuildType!" - ) - echo Generating Version Header set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog" - powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" "%__RepoRootDir%\eng\native-prereqs.proj" /bl:!__GenerateVersionLog! /t:BuildPrereqs /restore %__CommonBuildArgs% + powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" "%__RepoRootDir%\eng\native-prereqs.proj" /bl:!__GenerateVersionLog! /t:Build /restore %__CommonBuildArgs% if not !errorlevel! == 0 ( echo Generate Version Header FAILED goto ExitWithError @@ -177,9 +175,11 @@ if %__BuildNative% EQU 1 ( echo %__MsgPrefix%Regenerating the Visual Studio solution - set "__ManagedBinaryDir=%__RootBinDir%\bin" - set "__ManagedBinaryDir=!__ManagedBinaryDir:\=/!" - set __ExtraCmakeArgs=!__ExtraCmakeArgs! "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__TargetArch%" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%" + if %__Ninja% EQU 1 ( + set __ExtraCmakeArgs="-DCMAKE_BUILD_TYPE=!__BuildType!" + ) + + set __ExtraCmakeArgs=!__ExtraCmakeArgs! "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__TargetArch%" pushd "%__IntermediatesDir%" call "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__RepoRootDir%" "%__IntermediatesDir%" %VisualStudioVersion% %__HostArch% %__TargetOS% !__ExtraCmakeArgs! @@ -194,9 +194,16 @@ if %__BuildNative% EQU 1 ( goto ExitWithError ) set __BuildLog="%__LogDir%\Native.Build.binlog" + set __CmakeBuildToolArgs= + if %__Ninja% EQU 1 ( + set __CmakeBuildToolArgs= + ) else ( + REM We pass the /m flag directly to MSBuild so that we can get both MSBuild and CL parallelism, which is fastest for our builds. + set __CmakeBuildToolArgs=/bl:!__BuildLog! !__CommonBuildArgs! + ) - echo running "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- /bl:!__BuildLog! !__CommonBuildArgs! - "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- /bl:!__BuildLog! !__CommonBuildArgs! + echo running "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- !__CmakeBuildToolArgs! + "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- !__CmakeBuildToolArgs! if not !ERRORLEVEL! == 0 ( echo %__MsgPrefix%Error: native component build failed. Refer to the build log files for details: @@ -209,20 +216,6 @@ if %__BuildNative% EQU 1 ( endlocal ) -REM Copy the native SOS binaries to where these tools expect for CI & VS testing - -set "__targetFramework=net8.0" -set "__dotnet_sos=%__RootBinDir%\bin\dotnet-sos\%__BuildType%\%__targetFramework%" -set "__dotnet_dump=%__RootBinDir%\bin\dotnet-dump\%__BuildType%\%__targetFramework%" -mkdir %__dotnet_sos%\win-%__TargetArch% -mkdir %__dotnet_sos%\publish\win-%__TargetArch% -mkdir %__dotnet_dump%\win-%__TargetArch% -mkdir %__dotnet_dump%\publish\win-%__TargetArch% -xcopy /y /q /i %__BinDir% %__dotnet_sos%\win-%__TargetArch% -xcopy /y /q /i %__BinDir% %__dotnet_sos%\publish\win-%__TargetArch% -xcopy /y /q /i %__BinDir% %__dotnet_dump%\win-%__TargetArch% -xcopy /y /q /i %__BinDir% %__dotnet_dump%\publish\win-%__TargetArch% - REM ========================================================================================= REM === REM === All builds complete! diff --git a/eng/CdacPackageItems.props b/eng/CdacPackageItems.props new file mode 100644 index 0000000000..65e548d057 --- /dev/null +++ b/eng/CdacPackageItems.props @@ -0,0 +1,24 @@ + + + + <_cdacPackageVersion Condition="'$(TargetRid)' == 'win-x64'">$(runtimewinx64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'win-arm64'">$(runtimewinarm64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'linux-x64'">$(runtimelinuxx64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'linux-arm64'">$(runtimelinuxarm64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'osx-x64'">$(runtimeosxx64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'osx-arm64'">$(runtimeosxarm64MicrosoftDotNetCdacTransportVersion) + + + + + + + + + + \ No newline at end of file diff --git a/eng/Directory.Build.props b/eng/Directory.Build.props index fc1ff6e1d1..0f8214b1b2 100644 --- a/eng/Directory.Build.props +++ b/eng/Directory.Build.props @@ -1,4 +1,3 @@ - - \ No newline at end of file + diff --git a/eng/InstallNativePackages.targets b/eng/InstallNativePackages.targets new file mode 100644 index 0000000000..f8804fd7ab --- /dev/null +++ b/eng/InstallNativePackages.targets @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/InstallRuntimes.proj b/eng/InstallRuntimes.proj index 7b137bd2d3..d817ad01f9 100644 --- a/eng/InstallRuntimes.proj +++ b/eng/InstallRuntimes.proj @@ -1,7 +1,8 @@ - $(Platform) - $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant) $([MSBuild]::NormalizePath('$(LiveRuntimeDir)')) - + $(RepoRoot).dotnet-test\ HKEY_LOCAL_MACHINE\SOFTWARE - + $(RepoRoot).dotnet-test\x86\ HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node - -NoPath -SkipNonVersionedFiles -Architecture $(BuildArch) -InstallDir $(DotNetInstallRoot) + -NoPath -SkipNonVersionedFiles -Architecture $(TargetArch) -InstallDir $(DotNetInstallRoot) $([MSBuild]::NormalizeDirectory('$(DotNetInstallRoot)', 'shared', 'Microsoft.NETCore.App', '$(MicrosoftNETCoreAppRefVersion)')) $(DotNetInstallRoot)Debugger.Tests.Versions.txt diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dbff6546d3..260c35a22a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -43,6 +43,30 @@ https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f + + https://github.com/dotnet/dotnet + eaa19c281d34580a8168cff9ce1e7337da8bfe4f + + + https://github.com/dotnet/dotnet + eaa19c281d34580a8168cff9ce1e7337da8bfe4f + + + https://github.com/dotnet/dotnet + eaa19c281d34580a8168cff9ce1e7337da8bfe4f + + + https://github.com/dotnet/dotnet + eaa19c281d34580a8168cff9ce1e7337da8bfe4f + + + https://github.com/dotnet/dotnet + eaa19c281d34580a8168cff9ce1e7337da8bfe4f + + + https://github.com/dotnet/dotnet + eaa19c281d34580a8168cff9ce1e7337da8bfe4f + https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f diff --git a/eng/Versions.props b/eng/Versions.props index e972397467..8e96ea5ed8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -27,6 +27,14 @@ 10.0.100-preview.7.25351.106 + + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + false diff --git a/eng/build.ps1 b/eng/build.ps1 index 4425cd46ed..15f2d14f7e 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -7,6 +7,7 @@ Param( [switch] $installruntimes, [switch] $privatebuild, [switch] $ci, + [switch][Alias('bl')]$binaryLog, [switch] $skipmanaged, [switch] $skipnative, [switch] $bundletools, @@ -38,9 +39,12 @@ switch ($configuration.ToLower()) { $reporoot = Join-Path $PSScriptRoot ".." $engroot = Join-Path $reporoot "eng" $artifactsdir = Join-Path $reporoot "artifacts" +$os = "Windows_NT" $logdir = Join-Path $artifactsdir "log" $logdir = Join-Path $logdir Windows_NT.$architecture.$configuration +$bl = if ($binaryLog) { '-binaryLog' } else { '' } + if ($ci) { $remainingargs = "-ci " + $remainingargs } @@ -53,17 +57,18 @@ if ($bundletools) { $test = $False } -# Install sdk for building, restore and build managed components. -if (-not $skipmanaged) { - Invoke-Expression "& `"$engroot\common\build.ps1`" -configuration $configuration -verbosity $verbosity /p:BuildArch=$architecture /p:TestArchitectures=$architecture $remainingargs" +# Build native components +if (-not $skipnative) { + Invoke-Expression "& `"$engroot\Build-Native.cmd`" -architecture $architecture -configuration $configuration -verbosity $verbosity $remainingargs" if ($lastExitCode -ne 0) { exit $lastExitCode } } -# Build native components -if (-not $skipnative) { - Invoke-Expression "& `"$engroot\Build-Native.cmd`" -architecture $architecture -configuration $configuration -verbosity $verbosity $remainingargs" +# Install sdk for building, restore and build managed components. +if (-not $skipmanaged) { + Invoke-Expression "& `"$engroot\common\build.ps1`" -configuration $configuration -verbosity $verbosity $bl /p:TargetOS=$os /p:TargetArch=$architecture /p:TestArchitectures=$architecture $remainingargs" + if ($lastExitCode -ne 0) { exit $lastExitCode } @@ -81,7 +86,8 @@ if ($installruntimes -or $privatebuild) { /t:InstallTestRuntimes ` /bl:$logdir\InstallRuntimes.binlog ` /p:PrivateBuildTesting=$privatebuildtesting ` - /p:BuildArch=$architecture ` + /p:TargetOS=$os ` + /p:TargetArch=$architecture ` /p:TestArchitectures=$architecture ` /p:LiveRuntimeDir="$liveRuntimeDir" } @@ -92,14 +98,14 @@ if ($test) { if ($useCdac) { $env:SOS_TEST_CDAC="true" } - & "$engroot\common\build.ps1" ` -test ` -configuration $configuration ` -verbosity $verbosity ` -ci:$ci ` /bl:$logdir\Test.binlog ` - /p:BuildArch=$architecture ` + /p:TargetOS=$os ` + /p:TargetArch=$architecture ` /p:TestArchitectures=$architecture ` /p:DotnetRuntimeVersion="$dotnetruntimeversion" ` /p:DotnetRuntimeDownloadVersion="$dotnetruntimedownloadversion" ` diff --git a/eng/build.sh b/eng/build.sh index 01df8c8e6a..e84a3eb197 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -137,49 +137,17 @@ mkdir -p "$__IntermediatesDir" mkdir -p "$__LogsDir" mkdir -p "$__CMakeBinDir" -__ExtraCmakeArgs="$__CMakeArgs $__ExtraCmakeArgs -DCLR_MANAGED_BINARY_DIR=$__RootBinDir/bin -DCLR_BUILD_TYPE=$__BuildType" +__ExtraCmakeArgs="$__CMakeArgs $__ExtraCmakeArgs -DCLR_BUILD_TYPE=$__BuildType" # Specify path to be set for CMAKE_INSTALL_PREFIX. # This is where all built native libraries will copied to. export __CMakeBinDir="$__BinDir" - if [[ "$__TargetArch" == "armel" ]]; then # Armel cross build is Tizen specific and does not support Portable RID build __PortableBuild=0 fi -# -# Managed build -# - -if [[ "$__ManagedBuild" == 1 ]]; then - - echo "Commencing managed build for $__BuildType in $__RootBinDir/bin" - "$__RepoRootDir/eng/common/build.sh" --configuration "$__BuildType" $__CommonMSBuildArgs $__ManagedBuildArgs $__UnprocessedBuildArgs - - if [ "$?" != 0 ]; then - exit 1 - fi - - echo "Generating Version Source File" - __GenerateVersionLog="$__LogsDir/GenerateVersion.binlog" - - "$__RepoRootDir/eng/common/msbuild.sh" \ - $__RepoRootDir/eng/native-prereqs.proj \ - /bl:$__GenerateVersionLog \ - /t:BuildPrereqs \ - /restore \ - /p:Configuration="$__BuildType" \ - /p:Platform="$__TargetArch" \ - $__UnprocessedBuildArgs - - if [ $? != 0 ]; then - echo "Generating Version Source File FAILED" - exit 1 - fi -fi - # # Setup LLDB paths for native build # @@ -215,6 +183,26 @@ fi # Build native components # if [[ "$__NativeBuild" == 1 ]]; then + echo "Generating Version Source File" + __GenerateVersionLog="$__LogsDir/GenerateVersion.binlog" + + "$__RepoRootDir/eng/common/msbuild.sh" \ + $__RepoRootDir/eng/native-prereqs.proj \ + /bl:$__GenerateVersionLog \ + /t:Build \ + /restore \ + /p:Configuration="$__BuildType" \ + /p:TargetOS="$__TargetOS" \ + /p:TargetArch="$__TargetArch" \ + /p:TargetRid="$__TargetRid" \ + /p:Platform="$__TargetArch" \ + $__UnprocessedBuildArgs + + if [ $? != 0 ]; then + echo "Generating Version Source File FAILED" + exit 1 + fi + build_native "$__TargetOS" "$__TargetArch" "$__RepoRootDir" "$__IntermediatesDir" "install" "$__ExtraCmakeArgs" "diagnostic component" | tee "$__LogsDir"/make.log if [ "${PIPESTATUS[0]}" != 0 ]; then @@ -224,22 +212,24 @@ if [[ "$__NativeBuild" == 1 ]]; then fi # -# Copy the native SOS binaries to where these tools expect for testing +# Managed build # -if [[ "$__NativeBuild" == 1 || "$__Test" == 1 ]]; then - __targetFramework=net8.0 - __dotnet_sos=$__RootBinDir/bin/dotnet-sos/$__BuildType/$__targetFramework/publish/$__TargetRid - __dotnet_dump=$__RootBinDir/bin/dotnet-dump/$__BuildType/$__targetFramework/publish/$__TargetRid - - mkdir -p "$__dotnet_sos" - mkdir -p "$__dotnet_dump" +if [[ "$__ManagedBuild" == 1 ]]; then - cp "$__BinDir"/* "$__dotnet_sos" - echo "Copied SOS to $__dotnet_sos" + # __CommonMSBuildArgs contains TargetOS property + echo "Commencing managed build for $__BuildType in $__RootBinDir/bin" + "$__RepoRootDir/eng/common/build.sh" \ + --configuration "$__BuildType" \ + /p:TargetArch="$__TargetArch" \ + /p:TargetRid="$__TargetRid" \ + $__CommonMSBuildArgs \ + $__ManagedBuildArgs \ + $__UnprocessedBuildArgs - cp "$__BinDir"/* "$__dotnet_dump" - echo "Copied SOS to $__dotnet_dump" + if [ "$?" != 0 ]; then + exit 1 + fi fi # @@ -257,7 +247,9 @@ if [[ "$__InstallRuntimes" == 1 || "$__PrivateBuild" == 1 ]]; then /t:InstallTestRuntimes \ /bl:"$__LogsDir/InstallRuntimes.binlog" \ /p:PrivateBuildTesting="$__privateBuildTesting" \ - /p:BuildArch="$__TargetArch" \ + /p:TargetOS="$__TargetOS" \ + /p:TargetArch="$__TargetArch" \ + /p:TargetRid="$__TargetRid" \ /p:TestArchitectures="$__TargetArch" \ /p:LiveRuntimeDir="$__LiveRuntimeDir" fi @@ -310,11 +302,13 @@ if [[ "$__Test" == 1 ]]; then export SOS_TEST_CDAC="true" fi + # __CommonMSBuildArgs contains TargetOS property "$__RepoRootDir/eng/common/build.sh" \ --test \ --configuration "$__BuildType" \ /bl:"$__LogsDir"/Test.binlog \ - /p:BuildArch="$__TargetArch" \ + /p:TargetArch="$__TargetArch" \ + /p:TargetRid="$__TargetRid" \ /p:DotnetRuntimeVersion="$__DotnetRuntimeVersion" \ /p:DotnetRuntimeDownloadVersion="$__DotnetRuntimeDownloadVersion" \ /p:RuntimeSourceFeed="$__RuntimeSourceFeed" \ diff --git a/eng/native-prereqs.proj b/eng/native-prereqs.proj index bea0af21d1..f017e9d0ac 100644 --- a/eng/native-prereqs.proj +++ b/eng/native-prereqs.proj @@ -67,6 +67,13 @@ - + + + + + diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index 6b7cd6b2cb..312312daa3 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -797,6 +797,8 @@ if (MSVC) add_compile_options($<$:/fp:precise>) # Enable precise floating point # Disable C++ RTTI + # /GR is added by default by CMake, so remove it manually. + string(REPLACE "/GR " " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") add_compile_options($<$:/FC>) # use full pathnames in diagnostics diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index ffc2b959ee..ba061cc2f2 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -182,6 +182,7 @@ jobs: - script: $(_buildScript) -ci + -binaryLog -configuration ${{ config.configuration }} -architecture ${{ config.architecture }} $(_TestArgs) diff --git a/eng/pipelines/global-variables.yml b/eng/pipelines/global-variables.yml index fd258a9883..83c51fa583 100644 --- a/eng/pipelines/global-variables.yml +++ b/eng/pipelines/global-variables.yml @@ -69,3 +69,4 @@ variables: - ${{ if eq(parameters.runtimeFeedToken, 'dotnetclimsrc-sas-token-base64') }}: - name: RuntimeFeedBase64SasToken value: $(dotnetclimsrc-read-sas-token-base64) + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index ed7c3a0764..c2d80f41ed 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,5 @@ - false @@ -12,6 +11,5 @@ - + diff --git a/src/SOS/CMakeLists.txt b/src/SOS/CMakeLists.txt index e1de7aff33..901a26e428 100644 --- a/src/SOS/CMakeLists.txt +++ b/src/SOS/CMakeLists.txt @@ -25,5 +25,4 @@ add_compile_definitions(SOS_INCLUDE) add_compile_definitions(DISABLE_CONTRACTS) add_subdirectory(extensions) -add_subdirectory(SOS.Extensions) add_subdirectory(Strike) diff --git a/src/SOS/SOS.Extensions/CMakeLists.txt b/src/SOS/SOS.Extensions/CMakeLists.txt deleted file mode 100644 index b6aa9bf8c3..0000000000 --- a/src/SOS/SOS.Extensions/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -project(SOS.Extensions) - -if(NOT ${NUGET_PACKAGES} STREQUAL "") - set(DIASYMREADER_ARCH ${CLR_CMAKE_TARGET_ARCH}) - - if(NOT(CLR_CMAKE_TARGET_ARCH STREQUAL CLR_CMAKE_HOST_ARCH)) - set(DIASYMREADER_ARCH ${CLR_CMAKE_HOST_ARCH}) - endif() - - if (DIASYMREADER_ARCH STREQUAL x64) - set(DIASYMREADER_ARCH amd64) - endif() - - install(FILES ${NUGET_PACKAGES}/microsoft.diasymreader.native/17.10.0-beta1.24272.1/runtimes/win/native/Microsoft.DiaSymReader.Native.${DIASYMREADER_ARCH}.dll DESTINATION . ) -endif() - -if(NOT ${CLR_MANAGED_BINARY_DIR} STREQUAL "") - set(MANAGED_BINDIR ${CLR_MANAGED_BINARY_DIR}/SOS.Extensions/${CLR_BUILD_TYPE}/netstandard2.0/publish) - file(GLOB installfiles ${MANAGED_BINDIR}/*.dll ${MANAGED_BINDIR}/*.pdb) - install(FILES ${installfiles} DESTINATION . ) -endif() diff --git a/src/SOS/SOS.Extensions/SOS.Extensions.csproj b/src/SOS/SOS.Extensions/SOS.Extensions.csproj index a1ecf2ce33..f61bf5d269 100644 --- a/src/SOS/SOS.Extensions/SOS.Extensions.csproj +++ b/src/SOS/SOS.Extensions/SOS.Extensions.csproj @@ -12,7 +12,6 @@ - @@ -23,4 +22,15 @@ + + + + + + + + + diff --git a/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt b/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt index 6d1aeff17a..567493fa1e 100644 --- a/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt +++ b/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt @@ -29,8 +29,11 @@ set(DESKTOPCLRHOST_LIBRARY add_library_clr(DesktopClrHost SHARED ${DESKTOPCLRHOST_SOURCES}) +# When building with ninja we need to explicitly link against the 4.8.1 version of the .NET Framework SDK because it is the only one that supports ARM64. +if(CLR_CMAKE_TARGET_ARCH_ARM64) + target_link_directories(DesktopClrHost PRIVATE "$ENV{WindowsSdkDir}/../NETFXSDK/4.8.1/Lib/um/arm64") +endif(CLR_CMAKE_TARGET_ARCH_ARM64) + target_link_libraries(DesktopClrHost ${DESKTOPCLRHOST_LIBRARY}) -install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net8.0) -install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net9.0) -install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net10.0) +install_clr(TARGETS DesktopClrHost DESTINATIONS .) diff --git a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj b/src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj index 2ec653657d..e7d9777bc6 100644 --- a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj +++ b/src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj @@ -5,4 +5,14 @@ $(SupportedSubProcessTargetFrameworks) + + + + + + + + diff --git a/src/Tools/dotnet-dump/dotnet-dump.csproj b/src/Tools/dotnet-dump/dotnet-dump.csproj index d9326669b4..354c4aad45 100644 --- a/src/Tools/dotnet-dump/dotnet-dump.csproj +++ b/src/Tools/dotnet-dump/dotnet-dump.csproj @@ -1,4 +1,4 @@ - + $(NetCoreAppMinTargetFramework) @@ -36,4 +36,6 @@ + + diff --git a/src/Tools/dotnet-sos/dotnet-sos.csproj b/src/Tools/dotnet-sos/dotnet-sos.csproj index 36f4431a64..aed14a432f 100644 --- a/src/Tools/dotnet-sos/dotnet-sos.csproj +++ b/src/Tools/dotnet-sos/dotnet-sos.csproj @@ -1,4 +1,4 @@ - + $(NetCoreAppMinTargetFramework) dotnet-sos @@ -21,12 +21,14 @@ - - false - true - $(SOSPackagePathPrefix)/lib - lib/%(Filename)%(Extension) - PreserveNewest - + + false + true + $(SOSPackagePathPrefix)/lib + lib/%(Filename)%(Extension) + PreserveNewest + + + diff --git a/src/sos-packaging.props b/src/sos-packaging.props index f5b6a72e45..d182b2e29f 100644 --- a/src/sos-packaging.props +++ b/src/sos-packaging.props @@ -10,6 +10,7 @@ + @@ -18,38 +19,43 @@ + - - - + + + + - - - + + + - - - + + + - - - + + + + - - - + + + - - - + + + - - - + + + + - - - + + + + diff --git a/src/sos-packaging.targets b/src/sos-packaging.targets new file mode 100644 index 0000000000..18a2a56952 --- /dev/null +++ b/src/sos-packaging.targets @@ -0,0 +1,14 @@ + + + + + + $([MSBuild]::ValueOrDefault('%(FullPath)', '').Replace('linux-musl', 'linux')) + + + + + + \ No newline at end of file diff --git a/src/tests/Directory.Build.props b/src/tests/Directory.Build.props index 9abe7d34cd..e36d68d633 100644 --- a/src/tests/Directory.Build.props +++ b/src/tests/Directory.Build.props @@ -1,9 +1,3 @@ - - - $(Platform) - $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant) - - From fcaeae336c70cc9af2f7627c4b785c5eade0787f Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Fri, 18 Jul 2025 17:37:24 +0200 Subject: [PATCH 23/26] Launch dsrouter from gcdump (#5494) Continue the work of #5242 and add a --dsrouter switch to `dotnet-gcdump collect` fixes #5436 --- .../CommandLine/CollectCommandHandler.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Tools/dotnet-gcdump/CommandLine/CollectCommandHandler.cs b/src/Tools/dotnet-gcdump/CommandLine/CollectCommandHandler.cs index 02b0e39412..26af23d866 100644 --- a/src/Tools/dotnet-gcdump/CommandLine/CollectCommandHandler.cs +++ b/src/Tools/dotnet-gcdump/CommandLine/CollectCommandHandler.cs @@ -26,6 +26,7 @@ internal static class CollectCommandHandler /// Enable verbose logging. /// The process name to collect the gcdump from. /// The diagnostic IPC channel to collect the gcdump from. + /// The dsrouter command to use for collecting the gcdump. /// private static async Task Collect(CancellationToken ct, int processId, string output, int timeout, bool verbose, string name, string diagnosticPort, string dsrouter) { @@ -110,6 +111,10 @@ private static async Task Collect(CancellationToken ct, int processId, stri Console.Error.WriteLine($"[ERROR] {ex}"); return -1; } + finally + { + DsRouterProcessLauncher.Launcher.Cleanup(); + } } internal static bool TryCollectMemoryGraph(CancellationToken ct, int processId, string diagnosticPort, int timeout, bool verbose, out MemoryGraph memoryGraph) @@ -139,7 +144,8 @@ public static Command CollectCommand() VerboseOption, TimeoutOption, NameOption, - DiagnosticPortOption + DiagnosticPortOption, + DsRouterOption }; collectCommand.SetAction(static (parseResult, ct) => Collect(ct, @@ -149,7 +155,7 @@ public static Command CollectCommand() verbose: parseResult.GetValue(VerboseOption), name: parseResult.GetValue(NameOption), diagnosticPort: parseResult.GetValue(DiagnosticPortOption) ?? string.Empty, - dsrouter: string.Empty)); + dsrouter: parseResult.GetValue(DsRouterOption) ?? string.Empty)); return collectCommand; } @@ -191,5 +197,11 @@ public static Command CollectCommand() { Description = "The path to a diagnostic port to collect the dump from." }; + + private static readonly Option DsRouterOption = + new("--dsrouter") + { + Description = "The dsrouter command to use for collecting the gcdump. If specified, the --process-id, --name, or --diagnostic-port options cannot be used." + }; } } From 4a663430f87e1aa40589f4befcf3c42b8b02b7e3 Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Wed, 28 May 2025 13:41:16 +0200 Subject: [PATCH 24/26] stop using System.CommandLine types that won't be public anymore --- .../CommandService.cs | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs b/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs index 89b9a609bd..b04c4e0c1e 100644 --- a/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs +++ b/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs @@ -199,7 +199,7 @@ public string GetDetailedHelp(string commandName, IServiceProvider services, int { if (handler.IsCommandSupported(group.Parser, services)) { - return group.GetDetailedHelp(command, services, consoleWidth); + return group.GetDetailedHelp(command, services); } if (handler.FilterInvokeMessage != null) { @@ -276,7 +276,6 @@ private sealed class CommandGroup { private Command _rootCommand; private readonly Dictionary _commandHandlers = new(); - private readonly ParseResult _emptyParseResult; /// /// Create an instance of the command processor; @@ -285,10 +284,6 @@ private sealed class CommandGroup public CommandGroup(string commandPrompt = null) { _rootCommand = new Command(commandPrompt); - - // The actual ParseResult.Empty() has a bug in it where it tries to get the executable name - // and nothing is returned under lldb on Linux causing an index out of range exception. - _emptyParseResult = _rootCommand.Parse(Array.Empty()); } /// @@ -317,7 +312,7 @@ internal bool Execute(IReadOnlyList commandLine, IServiceProvider servic { sb.AppendLine(error.Message); } - string helpText = GetDetailedHelp(parseResult.CommandResult.Command, services, int.MaxValue); + string helpText = GetDetailedHelp(parseResult.CommandResult.Command, services); throw new CommandParsingException(sb.ToString(), helpText); } else @@ -433,14 +428,17 @@ internal void CreateCommand(Type type, CommandAttribute commandAttribute, Func Date: Wed, 28 May 2025 15:06:24 +0200 Subject: [PATCH 25/26] fix some of the failing tests --- .../CommandService.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs b/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs index b04c4e0c1e..5b953a1c73 100644 --- a/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs +++ b/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs @@ -436,9 +436,12 @@ internal string GetDetailedHelp(Command command, IServiceProvider services) Output = console }; - // Get the command help by parsing the --help option - // and invoking the help action that writes to configuration.Output. + // Get the command help by parsing the --help option. + // The option is hidden so it doesn't show up in the help text. + command.Options.Add(new HelpOption() { Hidden = true }); + // Invoking the help action writes to configuration.Output. command.Parse(["--help"], configuration).Invoke(); + command.Options.RemoveAt(command.Options.Count - 1); // Remove the help option // Get the detailed help if any if (TryGetCommandHandler(command.Name, out CommandHandler handler)) From dcfbc418b35ed817a7376d8a3f9e5f4b7db54722 Mon Sep 17 00:00:00 2001 From: Juan Sebastian Hoyos Ayala Date: Mon, 21 Jul 2025 18:12:51 -0700 Subject: [PATCH 26/26] Merge more changes from system.commandline --- eng/Version.Details.xml | 4 +++ eng/Versions.props | 2 +- .../CommandService.cs | 32 +++++++------------ src/Tools/Common/Commands/ProcessStatus.cs | 2 +- src/Tools/Common/ProcessTerminationHandler.cs | 17 +++++----- src/Tools/dotnet-counters/Program.cs | 4 +-- src/Tools/dotnet-dump/Program.cs | 6 ++-- src/Tools/dotnet-sos/Program.cs | 8 ++--- src/Tools/dotnet-stack/ReportCommand.cs | 4 +-- src/Tools/dotnet-stack/Symbolicate.cs | 4 +-- .../CommandLine/Commands/ConvertCommand.cs | 4 +-- 11 files changed, 40 insertions(+), 47 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 260c35a22a..37aac9a99f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,6 +9,10 @@ https://github.com/microsoft/clrmd d724947392626b66e39b525998a8817447d50380 + + https://github.com/dotnet/dotnet + 78061f4bcc414fa2054be6237b1fd3813d8edf6b + diff --git a/eng/Versions.props b/eng/Versions.props index 8e96ea5ed8..fd71110c9a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -56,7 +56,7 @@ 6.0.0 5.0.1 - 2.0.0-beta5.25210.1 + 2.0.0-beta7.25365.101 5.0.0 4.5.1 8.0.1 diff --git a/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs b/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs index 5b953a1c73..14251ece7c 100644 --- a/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs +++ b/src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs @@ -199,7 +199,7 @@ public string GetDetailedHelp(string commandName, IServiceProvider services, int { if (handler.IsCommandSupported(group.Parser, services)) { - return group.GetDetailedHelp(command, services); + return group.GetDetailedHelp(command, services, consoleWidth); } if (handler.FilterInvokeMessage != null) { @@ -295,15 +295,7 @@ public CommandGroup(string commandPrompt = null) /// parsing error internal bool Execute(IReadOnlyList commandLine, IServiceProvider services) { - IConsoleService consoleService = services.GetService(); - CommandLineConfiguration configuration = new(_rootCommand) - { - Output = new ConsoleServiceWrapper(consoleService.Write), - Error = new ConsoleServiceWrapper(consoleService.WriteError) - }; - - // Parse the command line and invoke the command - ParseResult parseResult = configuration.Parse(commandLine); + ParseResult parseResult = _rootCommand.Parse(commandLine); if (parseResult.Errors.Count > 0) { @@ -312,7 +304,7 @@ internal bool Execute(IReadOnlyList commandLine, IServiceProvider servic { sb.AppendLine(error.Message); } - string helpText = GetDetailedHelp(parseResult.CommandResult.Command, services); + string helpText = GetDetailedHelp(parseResult.CommandResult.Command, services, int.MaxValue); throw new CommandParsingException(sb.ToString(), helpText); } else @@ -428,20 +420,18 @@ internal void CreateCommand(Type type, CommandAttribute commandAttribute, Func