Skip to content

[WinEH] Missing register reload in catch funclet #60766

Closed
@kalle-llvm

Description

@kalle-llvm

This code:

https://godbolt.org/z/xxoY4zhTG

is miscompiled by clang, a register is not reloaded in the catch-funclet so 'this' becomes garbage inside the catch. I'm using 15.0.7 and I have tried different versions on godbolt. Starting with 8.0.0 they give essentially the same code. (Versions before this give correct code, but that may just be a fluke, this bug was hard to reproduce...)

Karl-Johan Johnsson

repro.cpp.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:codegenIR generation bugs: mangling, exceptions, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions