diff --git a/build_functions/default_vld.ini b/build_functions/default_vld.ini index c1861985..f0e2113d 100644 --- a/build_functions/default_vld.ini +++ b/build_functions/default_vld.ini @@ -49,4 +49,67 @@ SkipCrtStartupLeaks = yes ; - UuidFromStringA, UuidToStringA: RPCRT4.dll caches computer name via GetComputerNameExW ; - SymLoadModuleExW, SymGetLineFromAddr64, SymFromAddr, GetSymLoadError: dbghelp.dll symbol caches ; - SortGetHandle, InternalLcidToName, GetNamedLocaleHashNode: kernel locale caches -IgnoreFunctionsList = CryptFindOIDInfo,I_CryptGetAsn1Decoder,I_CryptGetAsn1Encoder,CryptEnumOIDFunction,CertOIDToAlgId,CryptMsgSignCTL,CryptMsgOpenToDecode,UuidFromStringA,UuidToStringA,SymLoadModuleExW,SymGetLineFromAddr64,SymFromAddr,GetSymLoadError,SortGetHandle,InternalLcidToName,GetNamedLocaleHashNode +; +; Winsock / DNS false positives (observed on VS 2025 / Windows Server 2025): +; +; - WahCreateHandleContextTable: undocumented WS2_32.dll internal function. +; Creates the Winsock helper (WAH) handle context hash table (2312-byte +; blocks allocated via GlobalAlloc). Called by WSAStartup to initialize +; the process-wide table, and again via WSASocketW/socket/mswsock for +; provider-specific tables. These are process-lifetime allocations that +; the OS cleans up at process exit. Using this internal name rather +; than the public callers (WSAStartup, WSASocketW, socket) avoids +; accidentally suppressing real application leaks in code that uses +; those public APIs. +; +; - WahInsertHandleContext: undocumented WS2_32.dll internal function. +; Inserts per-socket entries (256-byte blocks) into the WAH handle +; context hash table created by WahCreateHandleContextTable. These +; appear in call stacks that create sockets or resolve DNS. Using this +; internal name avoids suppressing real leaks from public socket APIs. +; +; - MesBufferHandleReset: undocumented RPCRT4.dll internal function. +; Called during DNS name resolution to cache the local computer name +; via GetComputerNameExW -> MesEncodeDynBufferHandleCreate. This is a +; one-time 32-byte RPC serialization buffer allocation that persists +; for the process lifetime. Using this internal name is preferred over +; the public MesEncodeDynBufferHandleCreate because the latter could +; mask real leaks from intentional RPC serialization usage. +; +; - WSALookupServiceBeginW: WS2_32.dll namespace provider lookup function. +; During DNS resolution, getaddrinfo -> GetAddrInfoW calls +; WSAEnumNameSpaceProvidersW, which internally calls +; WSALookupServiceBeginW to enumerate providers. On the first call, +; this triggers LoadLibraryExA to load rasadhlp.dll (Remote Access +; Service Address Helper), whose DLL initialization allocates 256-byte +; blocks (via malloc) that persist for the process lifetime. The +; rasadhlp.dll internal functions are unexported and unresolvable +; without PDBs, so we suppress at this level instead. Using +; WSALookupServiceBeginW rather than the public getaddrinfo avoids +; masking real leaks where application code calls getaddrinfo without +; a matching freeaddrinfo. +; NOTE: This is also covered by IgnoreModulesList below (rasadhlp.dll). +; WSALookupServiceBeginW is kept here as a fallback for older VLD +; versions that do not support IgnoreModulesList. +; +IgnoreFunctionsList = CryptFindOIDInfo,I_CryptGetAsn1Decoder,I_CryptGetAsn1Encoder,CryptEnumOIDFunction,CertOIDToAlgId,CryptMsgSignCTL,CryptMsgOpenToDecode,UuidFromStringA,UuidToStringA,SymLoadModuleExW,SymGetLineFromAddr64,SymFromAddr,GetSymLoadError,SortGetHandle,InternalLcidToName,GetNamedLocaleHashNode,WahCreateHandleContextTable,WahInsertHandleContext,MesBufferHandleReset,WSALookupServiceBeginW + +; Suppress false positives from system DLLs loaded during getaddrinfo. +; +; When getaddrinfo is first called, the Winsock layer (WS2_32.dll) +; enumerates namespace providers via WSAEnumNameSpaceProvidersW. This +; triggers dynamic loading of provider DLLs whose initialization allocates +; memory that persists for the process lifetime (freed at process exit). +; +; The majority of leak blocks come from RPCRT4.dll (RPC binding setup, +; buffer allocation, context handles) and KERNELBASE.dll (LoadLibraryExW +; for provider DLLs). The exact DLLs and block sizes vary by OS version +; and installed network providers. Common leaking DLLs include: +; +; - rasadhlp.dll: Remote Access Service Address Helper. Loaded via +; LoadLibraryExA during namespace provider enumeration. +; +; NOTE: IgnoreModulesList requires VLD v2.5.15+ with IgnoreModulesList +; support. Older VLD versions will silently ignore this option. +; +IgnoreModulesList = rasadhlp.dll diff --git a/pipeline_templates/build_and_run_tests.yml b/pipeline_templates/build_and_run_tests.yml index 1bc489bb..b7064845 100644 --- a/pipeline_templates/build_and_run_tests.yml +++ b/pipeline_templates/build_and_run_tests.yml @@ -251,10 +251,10 @@ jobs: repo_root: ${{ parameters.repo_root_override }} - task: PublishPipelineArtifact@1 - displayName: 'Publish ${{ parameters.ARCH_TYPE }} ${{ parameters.build_configuration}} Artifacts' + displayName: 'Publish ${{ parameters.ARCH_TYPE }} ${{ parameters.build_configuration}} ${{ parameters.GBALLOC_LL_TYPE }} Artifacts' inputs: targetPath: $(Build.BinariesDirectory) - artifactName: ${{ parameters.build_configuration}}_${{ parameters.ARCH_TYPE }}_artifacts + artifactName: ${{ parameters.build_configuration}}_${{ parameters.GBALLOC_LL_TYPE }}_${{ parameters.ARCH_TYPE }}_artifacts parallel: true condition: failed() diff --git a/vcpkg_triplets/arm64-windows-static-cbt-asan.cmake b/vcpkg_triplets/arm64-windows-static-cbt-asan.cmake index 12a608a7..b1fa03c3 100644 --- a/vcpkg_triplets/arm64-windows-static-cbt-asan.cmake +++ b/vcpkg_triplets/arm64-windows-static-cbt-asan.cmake @@ -1,7 +1,7 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v143) +# VCPKG_PLATFORM_TOOLSET not set - auto-detect from the current VS installation # Unfortunately we have to workaround an issue introduced in Visual Studio 17.10 where due to a change in mutex a break in the ABI seems to exist # https://github.com/microsoft/STL/releases/tag/vs-2022-17.10 # Fixed mutex's constructor to be constexpr. #3824 #4000 #4339 diff --git a/vcpkg_triplets/x64-windows-static-cbt-asan.cmake b/vcpkg_triplets/x64-windows-static-cbt-asan.cmake index 60f13d38..34a4e4b5 100644 --- a/vcpkg_triplets/x64-windows-static-cbt-asan.cmake +++ b/vcpkg_triplets/x64-windows-static-cbt-asan.cmake @@ -1,7 +1,7 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v143) +# VCPKG_PLATFORM_TOOLSET not set - auto-detect from the current VS installation # Unfortunately we have to workaround an issue introduced in Visual Studio 17.10 where due to a change in mutex a break in the ABI seems to exist # https://github.com/microsoft/STL/releases/tag/vs-2022-17.10 # Fixed mutex's constructor to be constexpr. #3824 #4000 #4339 diff --git a/vcpkg_triplets/x64-windows-static-cbt.cmake b/vcpkg_triplets/x64-windows-static-cbt.cmake index 8b352cdf..0b3017ed 100644 --- a/vcpkg_triplets/x64-windows-static-cbt.cmake +++ b/vcpkg_triplets/x64-windows-static-cbt.cmake @@ -1,7 +1,7 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v143) +# VCPKG_PLATFORM_TOOLSET not set - auto-detect from the current VS installation # Unfortunately we have to workaround an issue introduced in Visual Studio 17.10 where due to a change in mutex a break in the ABI seems to exist # https://github.com/microsoft/STL/releases/tag/vs-2022-17.10 # Fixed mutex's constructor to be constexpr. #3824 #4000 #4339 diff --git a/vcpkg_triplets/x86-windows-static-cbt-asan.cmake b/vcpkg_triplets/x86-windows-static-cbt-asan.cmake index e744f686..985a0756 100644 --- a/vcpkg_triplets/x86-windows-static-cbt-asan.cmake +++ b/vcpkg_triplets/x86-windows-static-cbt-asan.cmake @@ -1,7 +1,7 @@ set(VCPKG_TARGET_ARCHITECTURE x86) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v143) +# VCPKG_PLATFORM_TOOLSET not set - auto-detect from the current VS installation # Unfortunately we have to workaround an issue introduced in Visual Studio 17.10 where due to a change in mutex a break in the ABI seems to exist # https://github.com/microsoft/STL/releases/tag/vs-2022-17.10 # Fixed mutex's constructor to be constexpr. #3824 #4000 #4339 diff --git a/vcpkg_triplets/x86-windows-static-cbt.cmake b/vcpkg_triplets/x86-windows-static-cbt.cmake index aed23702..6345fc38 100644 --- a/vcpkg_triplets/x86-windows-static-cbt.cmake +++ b/vcpkg_triplets/x86-windows-static-cbt.cmake @@ -1,7 +1,7 @@ set(VCPKG_TARGET_ARCHITECTURE x86) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v143) +# VCPKG_PLATFORM_TOOLSET not set - auto-detect from the current VS installation # Unfortunately we have to workaround an issue introduced in Visual Studio 17.10 where due to a change in mutex a break in the ABI seems to exist # https://github.com/microsoft/STL/releases/tag/vs-2022-17.10 # Fixed mutex's constructor to be constexpr. #3824 #4000 #4339