Skip to content

.eh_frame is emitted for -C panic=abort on (at least) i686-pc-windows-gnu #128136

Closed

Description

@jieyouxu

#112403 tried to prevent .eh_frame from being emitted for -Cpanic=abort and added a test (tests/run-make/panic-abort-eh_frame/Makefile) to check unnecessary landing pads related to unwinding do not appear in the object file when -Cpanic=abort.

The original Makefile test was only-linux, and when @Oneirical tried to run the (roughly) equivalent test on Windows (see #127523), we found that this "no unnecessary landing pads" property (whichever property is checked by proxy via testing if DW_CFA exists) is not preserved at least on i686-pc-windows-gnu.

I don't understand much of this test, so I'll ask those who are more knowledgeable: for people more familiar with this test cc @nbdd0121 and @Nilstrieb, is this property also intended to be upheld on Windows and not just Linux?

Activity

  1. added
    O-windows
    A-codegen
    T-compiler
    A-MIR
    C-bug
    A-panic
    on Jul 24, 2024
  2. added
    needs-triage
    on Jul 24, 2024
  3. removed
    needs-triage
    on Jul 24, 2024
  4. changed the title [-]`.eh_frame` is emitted for -C panic=abort on (at least) `i686-pc-windows-gnu`[/-] [+]`.eh_frame` is emitted for `-C panic=abort` on (at least) `i686-pc-windows-gnu`[/+] on Jul 24, 2024
  5. nbdd0121 commented on Jul 24, 2024

    @nbdd0121
    Member

    We currently force uwtables to be emitted on Windows:

  6. jieyouxu commented on Jul 24, 2024

    @jieyouxu
    MemberAuthor

    We currently force uwtables to be emitted on Windows:

    Thank you, that's the context I'm missing 👍

  7. jieyouxu commented on Jul 25, 2024

    @jieyouxu
    MemberAuthor

    Actually re-opening because

    the test does pass on MSVC (see rust-lang-ci/rust/actions/runs/10017286801/job/27691281649, it's not even getting ignored). It even passes on x86 gnu-windows. It is only this one specific architecture (i686-mingw) that fails.

    So I'm really unsure what the intended behavior of this test is (on the i686-mingw CI job at least).

  8. nbdd0121 commented on Jul 25, 2024

    @nbdd0121
    Member

    On windows-gnu we also force uwtables.

    What's the issue of keeping only-linux?

  9. jieyouxu commented on Jul 25, 2024

    @jieyouxu
    MemberAuthor

    Hm, it was strange that only i686-mingw had the panic symbol but not other windows runners. Anyway, we can keep it only-linux. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRA-codegenA-panicC-bugO-windowsT-compiler

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions