Skip to content

Commit

Permalink
Merge pull request #95148 from carlossanlop/release/8.0-staging
Browse files Browse the repository at this point in the history
[manual] Merge release/8.0-staging into release/8.0
  • Loading branch information
carlossanlop committed Nov 23, 2023
2 parents 2fc9614 + aaa4b27 commit 8557ef2
Show file tree
Hide file tree
Showing 47 changed files with 1,046 additions and 160 deletions.
8 changes: 8 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-emsdk -->
<add key="darc-pub-dotnet-emsdk-201f4da" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-201f4dae/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-0af50f7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-0af50f73/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-d75f77c" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-d75f77cb/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-emsdk -->
<!-- Begin: Package sources from dotnet-sdk -->
<!-- End: Package sources from dotnet-sdk -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<!--
'src/test/PrepareTestAssets/PrepareTestAssets.proj' generates a NuGet.config file using this
Expand All @@ -28,5 +32,9 @@
</packageSources>
<disabledPackageSources>
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-sdk -->
<!-- End: Package sources from dotnet-sdk -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
</disabledPackageSources>
</configuration>
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@
<Sha>201f4dae9d1a1e105d8ba86d7ece61eed1f665e0</Sha>
<SourceBuild RepoName="emsdk" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23556.3">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23565.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>fa4c0e8f53ef2541a23e519af4dfb86cb88e1bae</Sha>
<Sha>95f83e27806330fec09edd96e06bba3acabe3f35</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.23518.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.23570.1">
<Uri>https://github.com/dotnet/source-build-externals</Uri>
<Sha>3dc05150cf234f76f6936dcb2853d31a0da1f60e</Sha>
<Sha>e844aa02a05b90d8cbe499676ec6ee0f19ec4980</Sha>
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
</Dependency>
</ProductDependencies>
Expand Down Expand Up @@ -354,9 +354,9 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>67613417f5e1af250e6ddfba79f8f2885d8e90fb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="8.0.0-alpha.0.23563.1">
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="8.0.0-alpha.0.23570.2">
<Uri>https://github.com/dotnet/hotreload-utils</Uri>
<Sha>12d02e5c2310be6460f896bc3aeb0ddf1e8926bc</Sha>
<Sha>5524f726f92ef862b415793758cebbd2a1950b70</Sha>
</Dependency>
<Dependency Name="System.Runtime.Numerics.TestData" Version="8.0.0-beta.23566.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>8.0.0-prerelease.23407.2</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>8.0.0-prerelease.23407.2</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>8.0.0-prerelease.23407.2</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>8.0.0-alpha.0.23563.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>8.0.0-alpha.0.23570.2</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<XUnitVersion>2.4.2</XUnitVersion>
<XUnitAnalyzersVersion>1.0.0</XUnitAnalyzersVersion>
<XUnitRunnerVisualStudioVersion>2.4.5</XUnitRunnerVisualStudioVersion>
Expand Down
13 changes: 10 additions & 3 deletions eng/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@
<ApiCompatIgnoreTargetPlatformMoniker Condition="'$(SuppressDependenciesWhenPacking)' == 'true'">true</ApiCompatIgnoreTargetPlatformMoniker>
<PackageDesignerMarkerFile>$(MSBuildThisFileDirectory)useSharedDesignerContext.txt</PackageDesignerMarkerFile>
<PackageReadmeFile Condition="'$(PackageReadmeFile)' == '' and Exists('PACKAGE.md')">PACKAGE.md</PackageReadmeFile>
<!-- Non-shipping packages shouldn't incrementally serviced. -->
<PackageUseIncrementalServicingVersion Condition="'$(IsShipping)' != 'true'">false</PackageUseIncrementalServicingVersion>
<!-- Generate packages for rid specific projects or for allconfigurations during build. -->
<!-- A package isn't generated if in servicing or in runtimelab. Intended to be overridden at project level. -->
<IsRIDSpecificProject Condition="$(MSBuildProjectName.StartsWith('runtime.')) and
!$(MSBuildProjectName.StartsWith('runtime.native'))">true</IsRIDSpecificProject>
<GeneratePackageOnBuild Condition="('$(BuildAllConfigurations)' == 'true' or
'$(IsRIDSpecificProject)' == 'true') and
'$(PreReleaseVersionLabel)' != 'servicing' and
<GeneratePackageOnBuild Condition="(
'$(BuildAllConfigurations)' == 'true' or
'$(IsRIDSpecificProject)' == 'true'
) and
(
'$(PreReleaseVersionLabel)' != 'servicing' or
'$(PackageUseIncrementalServicingVersion)' != 'true'
) and
'$(GitHubRepositoryName)' != 'runtimelab'">true</GeneratePackageOnBuild>
<!-- When in source-build we need to generate all packages when building for all configurations even in servicing. -->
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' != 'true' and
Expand Down
28 changes: 28 additions & 0 deletions src/coreclr/debug/daccess/enummem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,34 @@ HRESULT ClrDataAccess::EnumMemCLRStatic(IN CLRDataEnumMemoryFlags flags)

ReportMem(g_gcDacGlobals.GetAddr(), sizeof(GcDacVars));

PTR_WSTR entryAssemblyPath = (PTR_WSTR)g_EntryAssemblyPath;
entryAssemblyPath.EnumMem();

// Triage dumps must not include full paths (PII data). Replace entry assembly path with file name only.
if (flags == CLRDATA_ENUM_MEM_TRIAGE)
{
WCHAR* path = entryAssemblyPath;
if (path != NULL)
{
size_t pathLen = u16_strlen(path) + 1;

// Get the file name based on the last directory separator
const WCHAR* name = u16_strrchr(path, DIRECTORY_SEPARATOR_CHAR_W);
if (name != NULL)
{
name += 1;
size_t len = u16_strlen(name) + 1;
wcscpy_s(path, len, name);

// Null out the rest of the buffer
for (size_t i = len; i < pathLen; ++i)
path[i] = W('\0');

DacUpdateMemoryRegion(entryAssemblyPath.GetAddr(), pathLen, (BYTE*)path);
}
}
}

// We need all of the dac variables referenced by the GC DAC global struct.
// This struct contains pointers to pointers, so we first dereference the pointers
// to obtain the location of the variable that's reported.
Expand Down
6 changes: 4 additions & 2 deletions src/coreclr/inc/daccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@
#include "crosscomp.h"
#endif

#include <dn-u16.h>

// Information stored in the DAC table of interest to the DAC implementation
// Note that this information is shared between all instantiations of ClrDataAccess, so initialize
// it just once in code:ClrDataAccess.GetDacGlobals (rather than use fields in ClrDataAccess);
Expand Down Expand Up @@ -1493,10 +1495,10 @@ class __Str16Ptr : public __DPtr<WCHAR>
}
void EnumMem(void) const
{
char* str = DacInstantiateStringW(m_addr, maxChars, false);
WCHAR* str = DacInstantiateStringW(m_addr, maxChars, false);
if (str)
{
DacEnumMemoryRegion(m_addr, strlen(str) + 1);
DacEnumMemoryRegion(m_addr, u16_strlen(str) + 1);
}
}
};
Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/inc/dacvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,7 @@ DEFINE_DACVAR(SIZE_T, dac__g_clrNotificationArguments, ::g_clrNotificationArgume
DEFINE_DACVAR(bool, dac__g_metadataUpdatesApplied, ::g_metadataUpdatesApplied)
#endif

DEFINE_DACVAR(PTR_WSTR, dac__g_EntryAssemblyPath, ::g_EntryAssemblyPath)

#undef DEFINE_DACVAR
#undef DEFINE_DACVAR_NO_DUMP
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,11 @@ public void EmitDebugEHClauseInfo(ObjectNode node)
private static extern void EmitDebugFunctionInfo(IntPtr objWriter, byte[] methodName, int methodSize, uint methodTypeIndex);
public void EmitDebugFunctionInfo(ObjectNode node, int methodSize)
{
uint methodTypeIndex = 0;

var methodNode = node as IMethodNode;
if (methodNode != null)
if (node is IMethodNode methodNode)
{
methodTypeIndex = _userDefinedTypeDescriptor.GetMethodFunctionIdTypeIndex(methodNode.Method);
uint methodTypeIndex = _userDefinedTypeDescriptor.GetMethodFunctionIdTypeIndex(methodNode.Method);
EmitDebugFunctionInfo(_nativeObjectWriter, _currentNodeZeroTerminatedName.UnderlyingArray, methodSize, methodTypeIndex);
}

EmitDebugFunctionInfo(_nativeObjectWriter, _currentNodeZeroTerminatedName.UnderlyingArray, methodSize, methodTypeIndex);
}

[DllImport(NativeObjectWriterFileName)]
Expand Down
9 changes: 9 additions & 0 deletions src/coreclr/vm/corhost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,15 @@ HRESULT CorHost2::ExecuteAssembly(DWORD dwAppDomainId,

_ASSERTE (!pThread->PreemptiveGCDisabled());

if (g_EntryAssemblyPath == NULL)
{
// Store the entry assembly path for diagnostic purposes (for example, dumps)
size_t len = u16_strlen(pwzAssemblyPath) + 1;
NewArrayHolder<WCHAR> path { new WCHAR[len] };
wcscpy_s(path, len, pwzAssemblyPath);
g_EntryAssemblyPath = path.Extract();
}

Assembly *pAssembly = AssemblySpec::LoadAssembly(pwzAssemblyPath);

#if defined(FEATURE_MULTICOREJIT)
Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/vm/vars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ GVAL_IMPL_INIT(DWORD, g_debuggerWordTLSIndex, TLS_OUT_OF_INDEXES);
#endif
GVAL_IMPL_INIT(DWORD, g_TlsIndex, TLS_OUT_OF_INDEXES);

GVAL_IMPL_INIT(PTR_WSTR, g_EntryAssemblyPath, NULL);

#ifndef DACCESS_COMPILE

// <TODO> @TODO - PROMOTE. </TODO>
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/vm/vars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ GVAL_DECL(DWORD, g_debuggerWordTLSIndex);
#endif
GVAL_DECL(DWORD, g_TlsIndex);

// Full path to the managed entry assembly - stored for ease of identifying the entry asssembly for diagnostics
GVAL_DECL(PTR_WSTR, g_EntryAssemblyPath);

// Global System Information
extern SYSTEM_INFO g_SystemInfo;

Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/vm/weakreferencenative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ FCIMPL1(FC_BOOL_RET, ComAwareWeakReferenceNative::HasInteropInfo, Object* pObjec
_ASSERTE(pObject != nullptr);

SyncBlock* pSyncBlock = pObject->PassiveGetSyncBlock();
_ASSERTE(pSyncBlock != nullptr);
return pSyncBlock->GetInteropInfoNoCreate() != nullptr;
return pSyncBlock != nullptr && pSyncBlock->GetInteropInfoNoCreate() != nullptr;
}
FCIMPLEND

Expand Down
20 changes: 12 additions & 8 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
<StrongNameKeyId Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true'">$(TestStrongNameKeyId)</StrongNameKeyId>
</PropertyGroup>

<!-- Need to be defined before packaging.targets is imported. -->
<PropertyGroup>
<!-- The source of truth for these IsNETCoreApp* properties is NetCoreAppLibrary.props. -->
<IsNETCoreAppSrc Condition="'$(IsSourceProject)' == 'true' and
$(NetCoreAppLibrary.Contains('$(AssemblyName);'))">true</IsNETCoreAppSrc>
<IsNETCoreAppRef Condition="('$(IsReferenceAssemblyProject)' == 'true' or '$(IsRuntimeAndReferenceAssembly)' == 'true') and
$(NetCoreAppLibrary.Contains('$(AssemblyName);')) and
'$(IsPrivateAssembly)' != 'true'">true</IsNETCoreAppRef>
<IsNETCoreAppAnalyzer Condition="'$(IsGeneratorProject)' == 'true' and
$(NetCoreAppLibraryGenerator.Contains('$(MSBuildProjectName);'))">true</IsNETCoreAppAnalyzer>
</PropertyGroup>

<!-- resources.targets need to be imported before the Arcade SDK. -->
<Import Project="$(RepositoryEngineeringDir)resources.targets" />
<Import Project="..\..\Directory.Build.targets" />
Expand Down Expand Up @@ -47,14 +59,6 @@
-->
<WarningsAsErrors>$(WarningsAsErrors.Replace('NU1605', ''))</WarningsAsErrors>

<!-- The source of truth for these IsNETCoreApp* properties is NetCoreAppLibrary.props. -->
<IsNETCoreAppSrc Condition="'$(IsSourceProject)' == 'true' and
$(NetCoreAppLibrary.Contains('$(AssemblyName);'))">true</IsNETCoreAppSrc>
<IsNETCoreAppRef Condition="('$(IsReferenceAssemblyProject)' == 'true' or '$(IsRuntimeAndReferenceAssembly)' == 'true') and
$(NetCoreAppLibrary.Contains('$(AssemblyName);')) and
'$(IsPrivateAssembly)' != 'true'">true</IsNETCoreAppRef>
<IsNETCoreAppAnalyzer Condition="'$(IsGeneratorProject)' == 'true' and
$(NetCoreAppLibraryGenerator.Contains('$(MSBuildProjectName);'))">true</IsNETCoreAppAnalyzer>
<!-- Inbox analyzers shouldn't use the live targeting / runtime pack. They better depend on an LKG to avoid layering concerns. -->
<UseLocalTargetingRuntimePack Condition="'$(IsNETCoreAppAnalyzer)' == 'true'">false</UseLocalTargetingRuntimePack>
<!-- By default, disable implicit framework references for NetCoreAppCurrent libraries. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
<Compile Include="Microsoft.Bcl.TimeProvider.Common.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="$(MicrosoftBclAsyncInterfacesVersion)" />
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Bcl.AsyncInterfaces\ref\Microsoft.Bcl.AsyncInterfaces.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ System.TimeProvider
System.ITimer</PackageDescription>
<!-- This library uses IsPartialFacadeAssembly for which the compiler doesn't produce any XML documentation. -->
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<ServicingVersion>1</ServicingVersion>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -31,7 +33,7 @@ System.ITimer</PackageDescription>
</ItemGroup>

<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="$(MicrosoftBclAsyncInterfacesVersion)" />
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Bcl.AsyncInterfaces\src\Microsoft.Bcl.AsyncInterfaces.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Expand Down

0 comments on commit 8557ef2

Please sign in to comment.