Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NativeAOT] EXEC : error : Arithmetic operation resulted in an overflow. "...fsbackup2.msbuildproj" System.OverflowException: Arithmetic operation resulted in an overflow #66787

Closed
insinfo opened this issue Mar 17, 2022 · 3 comments · Fixed by #66972

Comments

@insinfo
Copy link

insinfo commented Mar 17, 2022

Description

Error compiling a hello world with Peachpie and NativeAOT

Reproduction Steps

dotnet new -i Peachpie.Templates::*
dotnet new console -lang PHP
dotnet add package Microsoft.DotNet.ILCompiler -v 7.0.0-*
dotnet publish -r win-x64 -c Release

Expected behavior

print "Hello World!" on console

Actual behavior

PS C:\MyCsharpProjects\fsbackup2> dotnet add package Microsoft.DotNet.ILCompiler -v 7.0.0-*
  Determinando os projetos a serem restaurados...
  Writing C:\Users\isaque\AppData\Local\Temp\tmp22FB.tmp
info : Adicionando PackageReference do pacote 'Microsoft.DotNet.ILCompiler' ao projeto 'C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj'.
info : Restaurando pacotes para C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj...
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.dotnet.ilcompiler/index.json
info :   OK https://api.nuget.org/v3-flatcontainer/microsoft.dotnet.ilcompiler/index.json 687 ms
info : O pacote 'Microsoft.DotNet.ILCompiler' é compatível com todas as estruturas especificadas no projeto 'C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj'.
info : PackageReference do pacote 'Microsoft.DotNet.ILCompiler' versão '7.0.0-*' adicionada ao arquivo 'C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj'.
info : Gerando arquivo do MSBuild C:\MyCsharpProjects\fsbackup2\obj\fsbackup2.msbuildproj.nuget.g.props.
info : Gerando arquivo do MSBuild C:\MyCsharpProjects\fsbackup2\obj\fsbackup2.msbuildproj.nuget.g.targets.
info : Gravando o arquivo de ativos no disco. Caminho: C:\MyCsharpProjects\fsbackup2\obj\project.assets.json
log  : C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj restaurado (em 1,06 sec).
PS C:\MyCsharpProjects\fsbackup2> dotnet publish -r win-x64 -c Release
Microsoft(R) Build Engine versão 17.2.0-preview-22152-03+719247ede para .NET
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

  Determinando os projetos a serem restaurados...
  C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj restaurado (em 40,67 sec).
  Você está usando uma versão prévia do .NET. Confira: https://aka.ms/dotnet-support-policy
  PeachPie PHP Compiler version 1.0.9+fd461dcb004df7d84be53252c300c4d882b81efd
  fsbackup2 -> C:\MyCsharpProjects\fsbackup2\bin\Release\net5.0\win-x64\fsbackup2.dll
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Generating compatible native code. To optimize for size or speed, visit https://aka.ms/OptimizeCoreRT
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\sdk\System.Private.CoreLib.dll : warning IL3053: Assembly 'System.Private.CoreLib' produced AOT analysis warnings. [C:\MyCsharpProjects\
fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\Microsoft.CSharp.dll : warning IL3053: Assembly 'Microsoft.CSharp' produced AOT analysis warnings. [C:\MyCsharpProjects\fsback
up2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\Microsoft.VisualBasic.Core.dll : warning IL3053: Assembly 'Microsoft.VisualBasic.Core' produced AOT analysis warnings. [C:\MyC
sharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Linq.Queryable.dll : warning IL3053: Assembly 'System.Linq.Queryable' produced AOT analysis warnings. [C:\MyCsharpProje
cts\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Private.DataContractSerialization.dll : warning IL3053: Assembly 'System.Private.DataContractSerialization' produced AO
T analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Reflection.DispatchProxy.dll : warning IL3053: Assembly 'System.Reflection.DispatchProxy' produced AOT analysis warning
s. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Runtime.Serialization.Formatters.dll : warning IL3053: Assembly 'System.Runtime.Serialization.Formatters' produced AOT
analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\htmlagilitypack\1.11.25\lib\netstandard2.0\HtmlAgilityPack.dll : warning IL3053: Assembly 'HtmlAgilityPack' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\microsoft.applicationinsights\2.10.0\lib\netstandard2.0\Microsoft.ApplicationInsights.dll : warning IL3053: Assembly 'Microsoft.ApplicationInsights' produced AOT analysis warnings. [C:\MyCsharpProjects\fs
backup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\mono.posix.netstandard\1.0.0\runtimes\win-x64\lib\netstandard2.0\Mono.Posix.NETStandard.dll : warning IL3053: Assembly 'Mono.Posix.NETStandard' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbacku
p2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\peachpie.library\1.0.9\lib\netstandard2.0\Peachpie.Library.dll : warning IL3053: Assembly 'Peachpie.Library' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Net.Quic.dll : warning IL3053: Assembly 'System.Net.Quic' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup
2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Text.Json.dll : warning IL3053: Assembly 'System.Text.Json' produced AOT analysis warnings. [C:\MyCsharpProjects\fsback
up2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\peachpie.microsoft.codeanalysis\3.7.1\lib\netstandard2.0\Peachpie.Microsoft.CodeAnalysis.dll : warning IL3053: Assembly 'Peachpie.Microsoft.CodeAnalysis' produced AOT analysis warnings. [C:\MyCsharpProjec
ts\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\peachpie.runtime\1.0.9\lib\netstandard2.0\Peachpie.Runtime.dll : warning IL3053: Assembly 'Peachpie.Runtime' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Linq.Expressions.dll : warning IL3053: Assembly 'System.Linq.Expressions' produced AOT analysis warnings. [C:\MyCsharpP
rojects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\sixlabors.imagesharp\1.0.0\lib\netcoreapp3.1\SixLabors.ImageSharp.dll : warning IL3053: Assembly 'SixLabors.ImageSharp' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj
]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Diagnostics.DiagnosticSource.dll : warning IL3053: Assembly 'System.Diagnostics.DiagnosticSource' produced AOT analysis
 warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\system.data.sqlclient\4.6.0\runtimes\win\lib\netcoreapp2.1\System.Data.SqlClient.dll : warning IL3053: Assembly 'System.Data.SqlClient' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbac
kup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Data.Common.dll : warning IL3053: Assembly 'System.Data.Common' produced AOT analysis warnings. [C:\MyCsharpProjects\fs
backup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\system.drawing.common\4.7.0\runtimes\win\lib\netcoreapp3.0\System.Drawing.Common.dll : warning IL3053: Assembly 'System.Drawing.Common' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbac
kup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Formats.Asn1.dll : warning IL3053: Assembly 'System.Formats.Asn1' produced AOT analysis warnings. [C:\MyCsharpProjects\
fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Private.Xml.dll : warning IL3053: Assembly 'System.Private.Xml' produced AOT analysis warnings. [C:\MyCsharpProjects\fs
backup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Collections.Specialized.dll : warning IL3053: Assembly 'System.Collections.Specialized' produced AOT analysis warnings.
 [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.ComponentModel.TypeConverter.dll : warning IL3053: Assembly 'System.ComponentModel.TypeConverter' produced AOT analysis
 warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Text.RegularExpressions.dll : warning IL3053: Assembly 'System.Text.RegularExpressions' produced AOT analysis warnings.
 [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
Tentando cancelar a compilação...
C:\Users\isaque\.nuget\packages\microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\build\Microsoft.NETCore.Native.targets(269,5): warning MSB5021: Encerrando a tarefa executável "cmd" e seus processos filho porque o build foi cancelado
. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
PS C:\MyCsharpProjects\fsbackup2> dotnet publish -r win-x64 -c Release
Microsoft(R) Build Engine versão 17.2.0-preview-22152-03+719247ede para .NET
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

  Determinando os projetos a serem restaurados...
  Todos os projetos estão atualizados para restauração.
  Você está usando uma versão prévia do .NET. Confira: https://aka.ms/dotnet-support-policy
  PeachPie PHP Compiler version 1.0.9+fd461dcb004df7d84be53252c300c4d882b81efd
  fsbackup2 -> C:\MyCsharpProjects\fsbackup2\bin\Release\net5.0\win-x64\fsbackup2.dll
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Generating compatible native code. To optimize for size or speed, visit https://aka.ms/OptimizeCoreRT
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\sdk\System.Private.CoreLib.dll : warning IL3053: Assembly 'System.Private.CoreLib' produced AOT analysis warnings. [C:\MyCsharpProjects\
fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\Microsoft.CSharp.dll : warning IL3053: Assembly 'Microsoft.CSharp' produced AOT analysis warnings. [C:\MyCsharpProjects\fsback
up2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\Microsoft.VisualBasic.Core.dll : warning IL3053: Assembly 'Microsoft.VisualBasic.Core' produced AOT analysis warnings. [C:\MyC
sharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Linq.Queryable.dll : warning IL3053: Assembly 'System.Linq.Queryable' produced AOT analysis warnings. [C:\MyCsharpProje
cts\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Private.DataContractSerialization.dll : warning IL3053: Assembly 'System.Private.DataContractSerialization' produced AO
T analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Reflection.DispatchProxy.dll : warning IL3053: Assembly 'System.Reflection.DispatchProxy' produced AOT analysis warning
s. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Runtime.Serialization.Formatters.dll : warning IL3053: Assembly 'System.Runtime.Serialization.Formatters' produced AOT
analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\htmlagilitypack\1.11.25\lib\netstandard2.0\HtmlAgilityPack.dll : warning IL3053: Assembly 'HtmlAgilityPack' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\microsoft.applicationinsights\2.10.0\lib\netstandard2.0\Microsoft.ApplicationInsights.dll : warning IL3053: Assembly 'Microsoft.ApplicationInsights' produced AOT analysis warnings. [C:\MyCsharpProjects\fs
backup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\mono.posix.netstandard\1.0.0\runtimes\win-x64\lib\netstandard2.0\Mono.Posix.NETStandard.dll : warning IL3053: Assembly 'Mono.Posix.NETStandard' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbacku
p2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\peachpie.library\1.0.9\lib\netstandard2.0\Peachpie.Library.dll : warning IL3053: Assembly 'Peachpie.Library' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Net.Quic.dll : warning IL3053: Assembly 'System.Net.Quic' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup
2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Text.Json.dll : warning IL3053: Assembly 'System.Text.Json' produced AOT analysis warnings. [C:\MyCsharpProjects\fsback
up2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\peachpie.microsoft.codeanalysis\3.7.1\lib\netstandard2.0\Peachpie.Microsoft.CodeAnalysis.dll : warning IL3053: Assembly 'Peachpie.Microsoft.CodeAnalysis' produced AOT analysis warnings. [C:\MyCsharpProjec
ts\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\peachpie.runtime\1.0.9\lib\netstandard2.0\Peachpie.Runtime.dll : warning IL3053: Assembly 'Peachpie.Runtime' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Linq.Expressions.dll : warning IL3053: Assembly 'System.Linq.Expressions' produced AOT analysis warnings. [C:\MyCsharpP
rojects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\sixlabors.imagesharp\1.0.0\lib\netcoreapp3.1\SixLabors.ImageSharp.dll : warning IL3053: Assembly 'SixLabors.ImageSharp' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj
]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Diagnostics.DiagnosticSource.dll : warning IL3053: Assembly 'System.Diagnostics.DiagnosticSource' produced AOT analysis
 warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\system.data.sqlclient\4.6.0\runtimes\win\lib\netcoreapp2.1\System.Data.SqlClient.dll : warning IL3053: Assembly 'System.Data.SqlClient' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbac
kup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Data.Common.dll : warning IL3053: Assembly 'System.Data.Common' produced AOT analysis warnings. [C:\MyCsharpProjects\fs
backup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\system.drawing.common\4.7.0\runtimes\win\lib\netcoreapp3.0\System.Drawing.Common.dll : warning IL3053: Assembly 'System.Drawing.Common' produced AOT analysis warnings. [C:\MyCsharpProjects\fsbackup2\fsbac
kup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Formats.Asn1.dll : warning IL3053: Assembly 'System.Formats.Asn1' produced AOT analysis warnings. [C:\MyCsharpProjects\
fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Private.Xml.dll : warning IL3053: Assembly 'System.Private.Xml' produced AOT analysis warnings. [C:\MyCsharpProjects\fs
backup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Collections.Specialized.dll : warning IL3053: Assembly 'System.Collections.Specialized' produced AOT analysis warnings.
 [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.ComponentModel.TypeConverter.dll : warning IL3053: Assembly 'System.ComponentModel.TypeConverter' produced AOT analysis
 warnings. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\framework\System.Text.RegularExpressions.dll : warning IL3053: Assembly 'System.Text.RegularExpressions' produced AOT analysis warnings.
 [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
EXEC : error : Arithmetic operation resulted in an overflow. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
  System.OverflowException: Arithmetic operation resulted in an overflow.
     at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[] oldHashtable)
     at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue value, Boolean& addedValue)
     at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey key)
     at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation)
     at ILCompiler.DependencyAnalysis.GVMDependenciesNode.SearchDynamicDependencies(List`1 markedNodes, Int32 firstNode, NodeFactory factory)
     at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.DynamicDependencyNode.MarkNewDynamicDependencies(DependencyAnalyzer`2 analyzer)
     at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack()
     at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes()
     at ILCompiler.ILScanner.ILCompiler.IILScanner.Scan()
     at ILCompiler.Program.Run(String[] args)
     at ILCompiler.Program.Main(String[] args)
C:\Users\isaque\.nuget\packages\microsoft.dotnet.ilcompiler\7.0.0-preview.2.22152.2\build\Microsoft.NETCore.Native.targets(269,5): error MSB3073: O comando ""C:\Users\isaque\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.
0.0-preview.2.22152.2\tools\\ilc" @"obj\Release\net5.0\win-x64\native\fsbackup2.ilc.rsp"" foi encerrado com o código 1. [C:\MyCsharpProjects\fsbackup2\fsbackup2.msbuildproj]
PS C:\MyCsharpProjects\fsbackup2>

PS C:\MyCsharpProjects\fsbackup2> C:\MyCsharpProjects\fsbackup2\bin\Release\net7.0\win-x64\native\fsbackup2.exe
Unhandled Exception: System.MissingMethodException: No parameterless constructor defined for this object.
   at System.ActivatorImplementation.CreateInstance(Type, Boolean) + 0x116
   at Pchp.Core.Reflection.ExtensionsTable.VisitAttribute(PhpExtensionAttribute) + 0x6a
   at Pchp.Core.Reflection.ExtensionsTable.VisitAssembly(Assembly) + 0x7a
   at Pchp.Core.Context.DllLoaderImpl.AddPhpPackageReference(Type) + 0x7f
   at Pchp.Core.Context.DllLoaderImpl.AddScriptReference(Assembly) + 0xed
   at Internal.Runtime.CompilerHelpers.StartupCodeHelpers.RunInitializers(TypeManagerHandle, ReadyToRunSectionType) + 0x45
   at Internal.Runtime.CompilerHelpers.StartupCodeHelpers.RunModuleInitializers() + 0x39
   at fsbackup2!<BaseAddress>+0x3174a2

Regression?

No response

Known Workarounds

No response

Configuration

.NET 7.0
Windows 11 x64

Other information

No response

@hez2010
Copy link
Contributor

hez2010 commented Mar 18, 2022

int newSize = checked(oldHashtable.Length * 2);

During expansion the size of LockFreeReaderHashtable turns exceeded of an array can storage.
May be related: #12221

@jkotas
Copy link
Member

jkotas commented Mar 18, 2022

This failure mode typically means that the project libraries contain exponential generic explosion or infinite generic cycle. Having more than 2GB array elements won't solve that problem.

@MichalStrehovsky MichalStrehovsky added this to the 7.0.0 milestone Mar 18, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 22, 2022
@MichalStrehovsky
Copy link
Member

Retarget the generated project to .NET 6.0 by editing the *.msbuildproj and replacing net5.0 with net6.0.

.NET 5.0 is not supported with NativeAOT. Apparently targeting it leads to disabling trimming on everything, including the entire framework. It's a lot of things to compile. I'll be putting a hard block on this to prevent this.

@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 22, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants