Skip to content

Commit e45602b

Browse files
cshungam11AaronRobinsonMSFT
authored
Update SystemTextJsonToolsetVersion (#108704) (#2715)
* Update SystemTextJsonToolsetVersion (#108704) * Fix Linux build * Avoid running tests * Update src/coreclr/inc/stack.h Co-authored-by: Aaron Robinson <arobins@microsoft.com> * Format string * Update src/coreclr/vm/interpreter.cpp --------- Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> Co-authored-by: Aaron Robinson <arobins@microsoft.com>
1 parent 222bb52 commit e45602b

File tree

6 files changed

+32
-32
lines changed

6 files changed

+32
-32
lines changed

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
<runtimenativeSystemIOPortsVersion>10.0.0-alpha.1.24472.5</runtimenativeSystemIOPortsVersion>
137137
<!-- Keep toolset versions in sync with dotnet/msbuild and dotnet/sdk -->
138138
<SystemCollectionsImmutableToolsetVersion>8.0.0</SystemCollectionsImmutableToolsetVersion>
139-
<SystemTextJsonToolsetVersion>8.0.4</SystemTextJsonToolsetVersion>
139+
<SystemTextJsonToolsetVersion>8.0.5</SystemTextJsonToolsetVersion>
140140
<SystemReflectionMetadataToolsetVersion>8.0.0</SystemReflectionMetadataToolsetVersion>
141141
<SystemReflectionMetadataLoadContextToolsetVersion>8.0.0</SystemReflectionMetadataLoadContextToolsetVersion>
142142
<!-- Runtime-Assets dependencies -->

eng/pipelines/runtimelab.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ extends:
8080
jobParameters:
8181
timeoutInMinutes: 180
8282
buildArgs: -s clr+libs+libs.tests+clr.hosts+packs -c $(_BuildConfig) /p:ArchiveTests=true
83-
postBuildSteps:
84-
- template: /eng/pipelines/libraries/helix.yml
85-
parameters:
86-
creator: dotnet-bot
87-
testRunNamePrefixSuffix: Libraries_$(_BuildConfig)
8883
extraVariablesTemplates:
8984
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
9085

src/coreclr/inc/stack.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ class Stack
1717
unsigned m_elemsSize;
1818
unsigned m_elemsCount;
1919

20-
static const unsigned InitSize = 8;
21-
2220
void GrowForPush()
2321
{
2422
if (m_elemsCount == m_elemsSize)
2523
{
24+
const unsigned InitSize = 8;
2625
m_elemsSize = max(InitSize, 2*m_elemsSize);
2726
T* newElems = new T[m_elemsSize];
2827
if (m_elemsCount != 0)

src/coreclr/vm/interpreter.cpp

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@
2222
#include "runtimehandles.h"
2323
#include "vars.hpp"
2424
#include "cycletimer.h"
25+
#include <math.h>
26+
#include <inttypes.h>
27+
28+
#ifndef _I64_MIN
29+
#define _I64_MIN LLONG_MIN
30+
#endif
31+
32+
#ifndef _I64_MAX
33+
#define _I64_MAX LLONG_MAX
34+
#endif
35+
36+
#ifndef _UI64_MAX
37+
#define _UI64_MAX ULLONG_MAX
38+
#endif
2539

2640
inline CORINFO_CALLINFO_FLAGS combine(CORINFO_CALLINFO_FLAGS flag1, CORINFO_CALLINFO_FLAGS flag2)
2741
{
@@ -6521,7 +6535,7 @@ void Interpreter::CkFinite()
65216535
break;
65226536
}
65236537

6524-
if (!isfinite(val))
6538+
if (!std::isfinite(val))
65256539
ThrowSysArithException();
65266540
}
65276541

@@ -6843,17 +6857,6 @@ void Interpreter::SetILInstrCategories()
68436857
}
68446858
#endif // INTERP_ILINSTR_PROFILE
68456859

6846-
#ifndef TARGET_WINDOWS
6847-
namespace
6848-
{
6849-
bool isnan(float val)
6850-
{
6851-
UINT32 bits = *reinterpret_cast<UINT32*>(&val);
6852-
return (bits & 0x7FFFFFFFU) > 0x7F800000U;
6853-
}
6854-
}
6855-
#endif
6856-
68576860
template<int op>
68586861
void Interpreter::CompareOp()
68596862
{
@@ -7160,7 +7163,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
71607163
else if (op == CO_GT_UN)
71617164
{
71627165
// Check for NAN's here: if either is a NAN, they're unordered, so this comparison returns true.
7163-
if (isnan(val1) || isnan(val2)) res = 1;
7166+
if (std::isnan(val1) || std::isnan(val2)) res = 1;
71647167
else if (val1 > val2) res = 1;
71657168
}
71667169
else if (op == CO_LT)
@@ -7171,7 +7174,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
71717174
{
71727175
_ASSERTE(op == CO_LT_UN);
71737176
// Check for NAN's here: if either is a NAN, they're unordered, so this comparison returns true.
7174-
if (isnan(val1) || isnan(val2)) res = 1;
7177+
if (std::isnan(val1) || std::isnan(val2)) res = 1;
71757178
else if (val1 < val2) res = 1;
71767179
}
71777180
}
@@ -7202,7 +7205,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
72027205
else if (op == CO_GT_UN)
72037206
{
72047207
// Check for NAN's here: if either is a NAN, they're unordered, so this comparison returns true.
7205-
if (isnan(val1) || isnan(val2)) res = 1;
7208+
if (std::isnan(val1) || std::isnan(val2)) res = 1;
72067209
else if (val1 > val2) res = 1;
72077210
}
72087211
else if (op == CO_LT)
@@ -7213,7 +7216,7 @@ INT32 Interpreter::CompareOpRes(unsigned op1idx)
72137216
{
72147217
_ASSERTE(op == CO_LT_UN);
72157218
// Check for NAN's here: if either is a NAN, they're unordered, so this comparison returns true.
7216-
if (isnan(val1) || isnan(val2)) res = 1;
7219+
if (std::isnan(val1) || std::isnan(val2)) res = 1;
72177220
else if (val1 < val2) res = 1;
72187221
}
72197222
}
@@ -11917,10 +11920,6 @@ void Interpreter::OpStackNormalize()
1191711920
m_orOfPushedInterpreterTypes = 0;
1191811921
}
1191911922

11920-
#if INTERP_TRACING
11921-
11922-
// Code copied from eeinterface.cpp in "compiler". Should be common...
11923-
1192411923
static const char* CorInfoTypeNames[] = {
1192511924
"undef",
1192611925
"void",
@@ -12036,6 +12035,10 @@ const char* Interpreter::getMethodName(CEEInfo* info, CORINFO_METHOD_HANDLE hnd,
1203612035
return info->getMethodNameFromMetadata(hnd, className, namespaceName, nullptr, 0);
1203712036
}
1203812037

12038+
#if INTERP_TRACING
12039+
12040+
// Code copied from eeinterface.cpp in "compiler". Should be common...
12041+
1203912042
const char* eeGetMethodFullName(CEEInfo* info, CORINFO_METHOD_HANDLE hnd, const char** clsName)
1204012043
{
1204112044
CONTRACTL {
@@ -12316,13 +12319,13 @@ void Interpreter::PrintValue(InterpreterType it, BYTE* valAddr)
1231612319
case CORINFO_TYPE_NATIVEINT:
1231712320
{
1231812321
INT64 val = static_cast<INT64>(*reinterpret_cast<NativeInt*>(valAddr));
12319-
fprintf(GetLogFile(), "%lld (= 0x%llx)", val, val);
12322+
fprintf(GetLogFile(), "%" PRId64 " (= 0x%" PRIx64 ")", val, val);
1232012323
}
1232112324
break;
1232212325
case CORINFO_TYPE_NATIVEUINT:
1232312326
{
1232412327
UINT64 val = static_cast<UINT64>(*reinterpret_cast<NativeUInt*>(valAddr));
12325-
fprintf(GetLogFile(), "%lld (= 0x%llx)", val, val);
12328+
fprintf(GetLogFile(), "%" PRIu64 " (= 0x%" PRIx64 ")", val, val);
1232612329
}
1232712330
break;
1232812331

@@ -12333,11 +12336,11 @@ void Interpreter::PrintValue(InterpreterType it, BYTE* valAddr)
1233312336
case CORINFO_TYPE_LONG:
1233412337
{
1233512338
INT64 val = *reinterpret_cast<INT64*>(valAddr);
12336-
fprintf(GetLogFile(), "%lld (= 0x%llx)", val, val);
12339+
fprintf(GetLogFile(), "%" PRId64 " (= 0x%" PRIx64 ")", val, val);
1233712340
}
1233812341
break;
1233912342
case CORINFO_TYPE_ULONG:
12340-
fprintf(GetLogFile(), "%lld", *reinterpret_cast<UINT64*>(valAddr));
12343+
fprintf(GetLogFile(), "%" PRIu64 "", *reinterpret_cast<UINT64*>(valAddr));
1234112344
break;
1234212345

1234312346
case CORINFO_TYPE_CLASS:

src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<PackageReference Include="LightInject.Microsoft.DependencyInjection" Version="3.7.1" />
2424
<PackageReference Include="Grace.DependencyInjection.Extensions" Version="7.1.0" />
2525
<PackageReference Include="Stashbox.Extensions.Dependencyinjection" Version="4.2.3" />
26+
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" />
2627
</ItemGroup>
2728

2829
<!-- These packages don't support .NETFramework -->

src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747

4848
<ItemGroup>
4949
<PackageReference Include="Microsoft.Playwright" Version="1.47.0" />
50+
<PackageReference Include="MSBuild.StructuredLogger" Version="2.2.350" />
51+
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" />
5052
<ProjectReference Include="$(RepoRoot)src\tasks\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj" />
5153
<Compile Include="$(BrowserProjectRoot)debugger\DebuggerTestSuite\BrowserLocator.cs" />
5254

0 commit comments

Comments
 (0)