Skip to content

C++ exceptions #10

@magras

Description

@magras

Code randomization breaks exception handling:

int main() {
    try { throw 42; }
    catch (int) {}
}
$ SZ_CODE=1 SZ_LOWER=1 szcc++ exception.cpp

...
LandingPadInst not the first non-PHI instruction in the block.
  %7 = landingpad { i8*, i32 }
          catch i8* %.indirect1
in function stabilizer_main
LLVM ERROR: Broken function found, compilation aborted!
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions