Skip to content

New "terminate called after throwing an instance of 'PAL_SEHException'" error with legacy EH enabled #113370

@jakobbotsch

Description

@jakobbotsch

Fuzzlyn runs are frequently hitting

terminate called after throwing an instance of 'PAL_SEHException

when running outside Windows. I've tracked it down to only happen with DOTNET_LegacyExceptionHandling=1.

Here's some repro instructions for linux-x64:

  1. Clone Fuzzlyn from https://github.com/jakobbotsch/Fuzzlyn
  2. Build main of dotnet/runtime at cc80345
  3. Build Fuzzlyn you cloned with dotnet build Fuzzlyn/Fuzzlyn.csproj -c Release (requires .NET 8 SDK)
  4. Save input.json from here to a file: https://gist.github.com/jakobbotsch/6e22479c2a901a25553e715106af5b52
  5. Set DOTNET_TieredCompilation=0, DOTNET_LegacyExceptionHandling=1, DOTNET_JitThrowOnAssertionFailure=1
  6. Run <path to core_root>/corerun <path to Fuzzlyn>/Fuzzlyn/bin/Release/net8.0/Fuzzlyn.ExecutionServer.dll <path to input.json>

The execution server creates a collectible ALC, loads an assembly from input.json into that ALC, and then runs a function. That function hits a JIT assert which causes the VM to throw an exception. It seems this exception does not get propagated properly when legacy EH is enabled.

P.S.: Fuzzlyn enables legacy EH only because of an old issue that should be resolved now, so I will just disable legacy EH. But this seems like regression in legacy EH related to #112666.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions