Skip to content

ILVerify fails to verify some catch-to-try leave instructions #48250

Open

Description

@jfd16

Description

To reproduce: Run ILVerify on the Foo.dll assembly in this zip file.
The following output should be produced:

[IL]: Error [LeaveIntoTry]: [...\Foo.dll : .A::m2(int32)][offset 0x00000014] Leave into try block.
1 Error(s) Verifying ...\Foo.dll

If the assembly is executed on .NET 5 (by invoking its Main method), it produces the expected output without any errors.

The assembly contains two static methods A.m1 and A.m2. Both contain leave instructions that jump from a catch block to its associated try block, which is legal according to ECMA-335, section I.12.4.2.8.2.8.

ILVerify correctly verifies the leave in A.m1. In A.m2, the catch block and the try block to which it jumps to are nested in another try block which has a finally block, which triggers the bug.

Configuration

ILVerify version: 5.0.0-rtm.20519.4+cf258a14b70ad9069470a108f13765e0e5988f51

Activity

  1. ghost added
    untriaged
    on Feb 12, 2021
  2. added
    area-Tools-ILVerification
    on Feb 12, 2021
  3. added
    help wanted
    on Jul 1, 2021
  4. added this to the 6.0.0 milestone on Jul 20, 2021
  5. added
    needs-further-triage
    and removed
    untriaged
    on Jul 20, 2021
  6. removed
    needs-further-triage
    on Jul 27, 2021
  7. modified the milestones: 6.0.0, Future on Jul 27, 2021
  8. JulieLeeMSFT commented on Jul 27, 2021

    @JulieLeeMSFT
    Member

    Moving to future since ILVerify is preview feature.

  9. added
    Priority:3
    on Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority:3area-Tools-ILVerificationhelp wanted

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions