Skip to content

Mach-O check for improperly nested .cfi_* regions doesn't take .alt_entry into account #82261

Closed
@Amanieu

Description

@Amanieu

This issue was hit in Amanieu/corosensei#23 where we have code that looks like this:

.globl _stack_init_trampoline
.private_extern _stack_init_trampoline
_stack_init_trampoline:
.cfi_startproc
[...]
.alt_entry _stack_init_trampoline_return
.globl _stack_init_trampoline_return
.private_extern _stack_init_trampoline_return
_stack_init_trampoline_return:
[...]
.cfi_endproc

This currently produces the following error due to https://reviews.llvm.org/D155245:

error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs

However I think (I am not an expert in Mach-O) that this should be valid since the inner label is properly marked with .alt_entry.

cc @jroelofs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions