-
Notifications
You must be signed in to change notification settings - Fork 1.4k
RAR dumps stack for BadImageFormatException when reading assembly #8140
Copy link
Copy link
Closed
Labels
needs-triageHave yet to determine what bucket this goes in.Have yet to determine what bucket this goes in.
Description
RAR (or whatever is running) should not dump stack when reading an invalid assembly.
It looks like here
| catch (ArgumentException) |
should be catching BadImageFormatException as well as ArgumentException since that method intends to return the exception not throw it.
Image is too small. [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at System.Reflection.Throw.ImageTooSmall() [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at System.Reflection.PortableExecutable.SectionHeader..ctor(PEBinaryReader& reader) [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at System.Reflection.PortableExecutable.PEHeaders.ReadSectionHeaders(PEBinaryReader& reader) [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at System.Reflection.PortableExecutable.PEHeaders..ctor(Stream peStream, Int32 size, Boolean isLoadedImage) [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at System.Reflection.PortableExecutable.PEReader.InitializePEHeaders() [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at System.Reflection.PortableExecutable.PEReader.GetMetadataBlock() [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at System.Reflection.Metadata.MetadataReader.GetAssemblyName(String assemblyFile) [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at Microsoft.Build.Shared.AssemblyNameExtension.GetAssemblyNameEx(String path) [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at Microsoft.Build.Tasks.SystemState.GetAssemblyName(String path) [...]
C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Microsoft.Common.CurrentVersion.targets(2318,5): error MSB3246: at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryAssemblyReferenceItem(ITaskItem referenceAssemblyName) [...]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-triageHave yet to determine what bucket this goes in.Have yet to determine what bucket this goes in.
Type
Fields
Give feedbackNo fields configured for issues without a type.