Skip to content

Commit

Permalink
Merge pull request #88646 from carlossanlop/release/7.0-staging
Browse files Browse the repository at this point in the history
[manual] Merge release/7.0-staging into release/7.0
  • Loading branch information
ViktorHofer authored Jul 11, 2023
2 parents d46ca7e + bfb6e0c commit e3034a1
Show file tree
Hide file tree
Showing 22 changed files with 342 additions and 147 deletions.
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="7.0.0-rtm.23218.4">
<Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="7.0.0-rtm.23315.2">
<Uri>https://github.com/dotnet/icu</Uri>
<Sha>790c182422d28de1900142c3a008c995e7d8078a</Sha>
<Sha>a7de1bebfa53d0f958e588633664ce008b78adf2</Sha>
</Dependency>
<Dependency Name="System.Net.MsQuic.Transport" Version="7.0.0-alpha.1.22459.1">
<Uri>https://github.com/dotnet/msquic</Uri>
Expand Down Expand Up @@ -242,9 +242,9 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>e680411c22e33f45821f4ae64365a2970b2430a6</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.23211.1">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.23321.1">
<Uri>https://github.com/dotnet/linker</Uri>
<Sha>9d4b3f3e0c100fe5ac4dc7f40d14d792178dbd0c</Sha>
<Sha>13a94b5bdc9d01ecd9eb2bd699bd34d597c3ec19</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="7.0.0-prerelease.23309.1">
<Uri>https://github.com/dotnet/xharness</Uri>
Expand Down Expand Up @@ -278,9 +278,9 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>5e0b0da43f660de5798186f4fd3bc900fc90576c</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="7.0.0-alpha.0.23226.5">
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="7.0.0-alpha.0.23316.2">
<Uri>https://github.com/dotnet/hotreload-utils</Uri>
<Sha>d4a9c1673071b9ef797eefc18a7586c92fcd34a1</Sha>
<Sha>0595e15def6557a758879ba1b48f95b9e08a6463</Sha>
</Dependency>
<Dependency Name="System.Runtime.Numerics.TestData" Version="7.0.0-beta.23179.6">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>7.0.0-preview-20221010.1</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
<MicrosoftNETILLinkTasksVersion>7.0.100-1.23211.1</MicrosoftNETILLinkTasksVersion>
<MicrosoftNETILLinkTasksVersion>7.0.100-1.23321.1</MicrosoftNETILLinkTasksVersion>
<MicrosoftNETILLinkAnalyzerPackageVersion>$(MicrosoftNETILLinkTasksVersion)</MicrosoftNETILLinkAnalyzerPackageVersion>
<!-- ICU -->
<MicrosoftNETCoreRuntimeICUTransportVersion>7.0.0-rtm.23218.4</MicrosoftNETCoreRuntimeICUTransportVersion>
<MicrosoftNETCoreRuntimeICUTransportVersion>7.0.0-rtm.23315.2</MicrosoftNETCoreRuntimeICUTransportVersion>
<!-- MsQuic -->
<MicrosoftNativeQuicMsQuicVersion>2.1.1</MicrosoftNativeQuicMsQuicVersion>
<SystemNetMsQuicTransportVersion>7.0.0-alpha.1.22459.1</SystemNetMsQuicTransportVersion>
Expand Down
24 changes: 19 additions & 5 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10280,7 +10280,7 @@ static int __cdecl cmp_mark_list_item (const void* vkey, const void* vdatum)
#endif // _DEBUG

#ifdef USE_REGIONS
uint8_t** gc_heap::get_region_mark_list (uint8_t* start, uint8_t* end, uint8_t*** mark_list_end_ptr)
uint8_t** gc_heap::get_region_mark_list (BOOL& use_mark_list, uint8_t* start, uint8_t* end, uint8_t*** mark_list_end_ptr)
{
size_t region_number = get_basic_region_index_for_address (start);
size_t source_number = region_number;
Expand Down Expand Up @@ -10410,6 +10410,13 @@ void gc_heap::merge_mark_lists (size_t total_mark_list_size)

// blast this piece to the mark list
append_to_mark_list(source[lowest_source], x);
#ifdef USE_REGIONS
if (mark_list_index > mark_list_end)
{
use_mark_list = false;
return nullptr;
}
#endif //USE_REGIONS
piece_count++;

source[lowest_source] = x;
Expand All @@ -10429,6 +10436,13 @@ void gc_heap::merge_mark_lists (size_t total_mark_list_size)
}
// we're left with just one source that we copy
append_to_mark_list(source[0], source_end[0]);
#ifdef USE_REGIONS
if (mark_list_index > mark_list_end)
{
use_mark_list = false;
return nullptr;
}
#endif //USE_REGIONS
piece_count++;
}

Expand Down Expand Up @@ -10485,7 +10499,7 @@ static uint8_t** binary_search (uint8_t** left, uint8_t** right, uint8_t* e)
return a + l;
}

uint8_t** gc_heap::get_region_mark_list (uint8_t* start, uint8_t* end, uint8_t*** mark_list_end_ptr)
uint8_t** gc_heap::get_region_mark_list (BOOL& use_mark_list, uint8_t* start, uint8_t* end, uint8_t*** mark_list_end_ptr)
{
// do a binary search over the sorted marked list to find start and end of the
// mark list for this region
Expand Down Expand Up @@ -29235,7 +29249,7 @@ void gc_heap::plan_phase (int condemned_gen_number)
uint8_t** mark_list_index = nullptr;
uint8_t** mark_list_next = nullptr;
if (use_mark_list)
mark_list_next = get_region_mark_list (x, end, &mark_list_index);
mark_list_next = get_region_mark_list (use_mark_list, x, end, &mark_list_index);
#else // USE_REGIONS
assert (!marked (x));
uint8_t** mark_list_next = &mark_list[0];
Expand Down Expand Up @@ -29523,7 +29537,7 @@ void gc_heap::plan_phase (int condemned_gen_number)
current_brick = brick_of (x);
#ifdef USE_REGIONS
if (use_mark_list)
mark_list_next = get_region_mark_list (x, end, &mark_list_index);
mark_list_next = get_region_mark_list (use_mark_list, x, end, &mark_list_index);

if (should_sweep_in_plan (seg1))
{
Expand Down Expand Up @@ -29593,7 +29607,7 @@ void gc_heap::plan_phase (int condemned_gen_number)
current_brick = brick_of (x);

if (use_mark_list)
mark_list_next = get_region_mark_list (x, end, &mark_list_index);
mark_list_next = get_region_mark_list (use_mark_list, x, end, &mark_list_index);

if (should_sweep_in_plan (seg1))
{
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/gc/gcpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -3433,7 +3433,7 @@ class gc_heap

#ifdef USE_REGIONS
PER_HEAP
uint8_t** get_region_mark_list (uint8_t* start, uint8_t* end, uint8_t*** mark_list_end);
uint8_t** get_region_mark_list (BOOL& use_mark_list, uint8_t* start, uint8_t* end, uint8_t*** mark_list_end);
#endif //USE_REGIONS

#ifdef BACKGROUND_GC
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/proftoeeinterfaceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4332,7 +4332,7 @@ HRESULT ProfToEEInterfaceImpl::GetILFunctionBody(ModuleID moduleId,

PEAssembly *pPEAssembly = pModule->GetPEAssembly();

if (!pPEAssembly->HasLoadedPEImage())
if (!pPEAssembly->IsLoaded())
return (CORPROF_E_DATAINCOMPLETE);

LPCBYTE pbMethod = NULL;
Expand Down Expand Up @@ -4442,7 +4442,7 @@ HRESULT ProfToEEInterfaceImpl::GetILFunctionBodyAllocator(ModuleID modul
Module * pModule = (Module *) moduleId;

if (pModule->IsBeingUnloaded() ||
!pModule->GetPEAssembly()->HasLoadedPEImage())
!pModule->GetPEAssembly()->IsLoaded())
{
return (CORPROF_E_DATAINCOMPLETE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ public void AppHost_FrameworkDependent_GlobalLocation_Succeeds(bool useRegistere
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("Hello World")
.And.HaveStdOutContaining(sharedTestState.RepoDirectories.MicrosoftNETCoreAppVersion);
.And.HaveStdOutContaining(sharedTestState.RepoDirectories.MicrosoftNETCoreAppVersion)
.And.NotHaveStdErr();

// Verify running from within the working directory
Command.Create(appExe)
Expand All @@ -336,7 +337,8 @@ public void AppHost_FrameworkDependent_GlobalLocation_Succeeds(bool useRegistere
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("Hello World")
.And.HaveStdOutContaining(sharedTestState.RepoDirectories.MicrosoftNETCoreAppVersion);
.And.HaveStdOutContaining(sharedTestState.RepoDirectories.MicrosoftNETCoreAppVersion)
.And.NotHaveStdErr();
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/installer/tests/HostActivation.Tests/StartupHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ public void Muxer_activation_of_Empty_StartupHook_Variable_Succeeds()
.CaptureStdErr()
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("Hello World");
.And.HaveStdOutContaining("Hello World")
.And.NotHaveStdErr();
}

// Run the app with a startup hook assembly that depends on assemblies not on the TPA list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- When building from source, ensure the RID we're building for is part of the RID graph -->
<AdditionalRuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(AdditionalRuntimeIdentifiers);$(OutputRID)</AdditionalRuntimeIdentifiers>
<ServicingVersion>4</ServicingVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,17 @@ internal Deflater(CompressionLevel compressionLevel, int windowBits)

ZLibNative.CompressionStrategy strategy = ZLibNative.CompressionStrategy.DefaultStrategy;

ZLibNative.ZLibStreamHandle? zlibStream = null;
ZErrorCode errC;
try
{
errC = ZLibNative.CreateZLibStreamForDeflate(out zlibStream, zlibCompressionLevel,
errC = ZLibNative.CreateZLibStreamForDeflate(out _zlibStream, zlibCompressionLevel,
windowBits, memLevel, strategy);
}
catch (Exception cause)
{
zlibStream?.Dispose();
throw new ZLibException(SR.ZLibErrorDLLLoadError, cause);
}

_zlibStream = zlibStream;

switch (errC)
{
case ZErrorCode.Ok:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,16 @@ public void Dispose()
[MemberNotNull(nameof(_zlibStream))]
private void InflateInit(int windowBits)
{
ZLibNative.ZLibStreamHandle? zlibStream = null;
ZLibNative.ErrorCode error;
try
{
error = ZLibNative.CreateZLibStreamForInflate(out zlibStream, windowBits);
error = ZLibNative.CreateZLibStreamForInflate(out _zlibStream, windowBits);
}
catch (Exception exception) // could not load the ZLib dll
{
zlibStream?.Dispose();
throw new ZLibException(SR.ZLibErrorDLLLoadError, exception);
}

_zlibStream = zlibStream;

switch (error)
{
case ZLibNative.ErrorCode.Ok: // Successful initialization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ public void GetRuntimeProperties()
Assert.Contains("CanRead", propertyNames);
Assert.Contains("CanWrite", propertyNames);
Assert.Contains("CanSeek", propertyNames);

List<PropertyInfo> props = typeof(TestClass).GetRuntimeProperties().ToList();
Assert.Equal(2, props.Count);
}

[Fact]
Expand Down Expand Up @@ -359,6 +362,16 @@ private class TestDerived : TestBase
public override void Foo() { throw null; }
}

private class TestClassBase
{
internal int TestClassBaseProperty { get; set; }
}

private class TestClass : TestClassBase
{
internal int TestClassProperty { get; set; }
}

abstract class TestTypeBase : IDisposable
{
public abstract bool CanRead { get; }
Expand Down
3 changes: 2 additions & 1 deletion src/libraries/System.Reflection/tests/AssemblyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void ExportedTypes(Type type, bool expected)

[Fact]
[SkipOnPlatform(TestPlatforms.Browser, "entry assembly won't be xunit.console on browser")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/36892", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/36892", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst | TestPlatforms.Android)]
public void GetEntryAssembly()
{
Assert.NotNull(Assembly.GetEntryAssembly());
Expand Down Expand Up @@ -872,6 +872,7 @@ public static void AssemblyGetForwardedTypes()

[Fact]
[ActiveIssue("https://github.com/dotnet/runtimelab/issues/155", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
[ActiveIssue("https://github.com/dotnet/runtimelab/issues/77821", TestPlatforms.Android)]
public static void AssemblyGetForwardedTypesLoadFailure()
{
Assembly a = typeof(TypeInForwardedAssembly).Assembly;
Expand Down
3 changes: 2 additions & 1 deletion src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@

<!-- wasm EAT/AOT -->
<ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(RunDisabledWasmTests)' != 'true' and '$(EnableAggressiveTrimming)' == 'true'">
<!-- https://github.com/dotnet/runtime/issues/86916 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Formats.Cbor\tests\System.Formats.Cbor.Tests.csproj" />
</ItemGroup>

<!-- Wasm aot on all platforms -->
Expand Down Expand Up @@ -171,7 +173,6 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.FileSystem.Watcher\tests\System.IO.FileSystem.Watcher.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.Ports\tests\System.IO.Ports.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Quic\tests\FunctionalTests\System.Net.Quic.Functional.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection\tests\System.Reflection.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.Serialization.Formatters\tests\System.Runtime.Serialization.Formatters.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Security.Cryptography.Algorithms\tests\System.Security.Cryptography.Algorithms.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Security.Cryptography.Csp\tests\System.Security.Cryptography.Csp.Tests.csproj" />
Expand Down
8 changes: 1 addition & 7 deletions src/mono/mono/metadata/icall.c
Original file line number Diff line number Diff line change
Expand Up @@ -4032,8 +4032,6 @@ property_accessor_nonpublic (MonoMethod* accessor, gboolean start_klass)
GPtrArray*
ves_icall_RuntimeType_GetPropertiesByName_native (MonoQCallTypeHandle type_handle, gchar *propname, guint32 bflags, guint32 mlisttype, MonoError *error)
{
// Fetch non-public properties as well because they can hide public properties with the same name in base classes
bflags |= BFLAGS_NonPublic;
MonoType *type = type_handle.type;

if (m_type_is_byref (type))
Expand Down Expand Up @@ -4072,11 +4070,9 @@ ves_icall_RuntimeType_GetPropertiesByName_native (MonoQCallTypeHandle type_handl
(prop->set && ((prop->set->flags & METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK) == METHOD_ATTRIBUTE_PUBLIC))) {
if (bflags & BFLAGS_Public)
match++;
} else if (bflags & BFLAGS_NonPublic) {
if (property_accessor_nonpublic(prop->get, startklass == klass) ||
} else if (property_accessor_nonpublic(prop->get, startklass == klass) ||
property_accessor_nonpublic(prop->set, startklass == klass)) {
match++;
}
}
if (!match)
continue;
Expand Down Expand Up @@ -4106,8 +4102,6 @@ ves_icall_RuntimeType_GetPropertiesByName_native (MonoQCallTypeHandle type_handl
g_hash_table_insert (properties, prop, prop);
}
if (!(bflags & BFLAGS_DeclaredOnly) && (klass = m_class_get_parent (klass))) {
// BFLAGS_NonPublic should be excluded for base classes
bflags &= ~BFLAGS_NonPublic;
goto handle_parent;
}

Expand Down
Loading

0 comments on commit e3034a1

Please sign in to comment.