Skip to content

[NativeAOT] Consider encoding epilogs/prologs in GC or Debug info.  #101932

Open

Description

@VSadov

Some platforms have problems with unwinding epilogs/prologs. We solve that issue by examining instructions and looking for patterns indicating prolog/epilog.

Any platform that has such problems and can't figure un-unwindable ranges from the debug/unwind info will have to implement something like this. The complexity and fragility of such heuristics will vary. Some ABIs are more strict about epilog shapes than others.
It also puts implicit restrictions on what codegen can do, which can lead to bugs like: #101896

Just encoding prologs/epilogs seems more reliable and will reduce the burden for platform adoption or for future changes in JIT.

Encoding the epilogs may not be straightforward though:

  • not all platforms need that
  • CoreCLR does not need that
  • there could be several epilogs in a method, so the record will have variable size, and possibly stored at variable position too (if there are other variable-size things, like in GC info)
  • multiple prologs is not something completely unthinkable either, although not used right now.
  • searching through info on a side could be more expensive that looking at instructions currently executed.

Activity

  1. changed the title [-][NativeAOT] Consider encoding epilogs/prologs in GC info. [/-] [+][NativeAOT] Consider encoding epilogs/prologs in GC or Debug info. [/+] on May 6, 2024
  2. dotnet-policy-service commented on May 6, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
    See info in area-owners.md if you want to be subscribed.

  3. added this to the Future milestone on May 13, 2024
  4. removed
    untriagedNew issue has not been triaged by the area owner
    on May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions