Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 64 additions & 1 deletion build_functions/default_vld.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions pipeline_templates/build_and_run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion vcpkg_triplets/arm64-windows-static-cbt-asan.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion vcpkg_triplets/x64-windows-static-cbt-asan.cmake
Original file line number Diff line number Diff line change
@@ -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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really have to double check this comment. This caused us to have a hotfix when it happened - I remember that coverage with offload showed some issues but it did get to production, so we should not take it lightly and at least we should ensure that the thing we build with in the gate has the code we want ...
Sorry, it sounds panicky, but at 5k clusters I really don't want to run around patching and retaking stuff if we knew of a potential issue.

Expand Down
2 changes: 1 addition & 1 deletion vcpkg_triplets/x64-windows-static-cbt.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion vcpkg_triplets/x86-windows-static-cbt-asan.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion vcpkg_triplets/x86-windows-static-cbt.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down