Skip to content

exception catch clause does work on Linux arm/arm64 for .net 6.0 release #62702

Closed
@oldzhu

Description

@oldzhu

Description

exception catch clause does work on Linux arm/arm64 as expected for .net 6.0 release

Reproduction Steps

  1. wrote a program as the below:
using System;

namespace dotnethello
{
        class Program
        {
                static void Main(string[] args)
                {
                        var coreAssemblyInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(object).Assembly.Location);
                        Console.WriteLine($"Hello World from .NET {coreAssemblyInfo.ProductVersion}");
                        Console.WriteLine($"The location is {typeof(object).Assembly.Location}");
                        try
                        {
                                func3();
                        }
                        catch (Exception ex)
                        {
                        }
                        Console.WriteLine("press anykey to exit...");
                        Console.ReadLine();
                }
                static void func3()
                {
                        throw new System.IO.IOException();
                }
        }
}
  1. Publish as self-contained program using
dotnet publish -r linux-arm64 -c Release

or

dotnet publish -r linux-arm -c Release
  1. Found a linux arm/arm64 system and copy the self-contained publish folder to the box.
  2. Run the program on the linux arm/arm64 system.

Expected behavior

The exception is caught and discarded silently

(lldb) r
Process 124 launched: '/root/dotnethello/dotnethello' (aarch64)
warning: (aarch64) /usr/lib64/libstdc++.so.6 unsupported DW_FORM value: 0x1e
Process 124 stopped and restarted: thread 1 received signal: SIGCHLD
Process 124 stopped and restarted: thread 1 received signal: SIGCHLD
Hello World from .NET 6.0.0-dev
The location is /root/dotnethello/System.Private.CoreLib.dll
press anykey to exit...

Actual behavior

The exception is not caught and cause the program terminated.

(lldb) r
Process 124 launched: '/root/dotnethello/dotnethello' (aarch64)
warning: (aarch64) /usr/lib64/libstdc++.so.6 unsupported DW_FORM value: 0x1e
Process 124 stopped and restarted: thread 1 received signal: SIGCHLD
Process 124 stopped and restarted: thread 1 received signal: SIGCHLD
Hello World from .NET 6.0.0-dev
The location is /root/dotnethello/System.Private.CoreLib.dll
Unhandled exception. System.IO.IOException: I/O error occurred.
   at dotnethello.Program.func3() in /home/oldzhu/buildroot/output/build/dotnethello-1.0/Program.cs:line 33
   at dotnethello.Program.Main(String[] args) in /home/oldzhu/buildroot/output/build/dotnethello-1.0/Program.cs:line 13
Process 124 stopped
* thread #1, name = 'dotnethello', stop reason = signal SIGABRT
...

Regression?

seems there is no such issue at .net 6.0 rc releases...

Known Workarounds

no

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-arm64area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions