Skip to content

Switching from setjmp/longjmp exceptions to another kind #56466

@gbaraldi

Description

@gbaraldi

Setjmp/longjmp exceptions are expensive and require several workarounds to work correctly. Things like the phic nodes/upsilon nodes that cause too much rooting. Also LLVM poorly understands the behaviour of it, basically giving up on many things when seeing a return twice function.
Setjmp is also not a free operation, requiring one to store the whole CPU state.

Talking with @vtjnash I think we should work towards moving to exceptions that look a bit more like C++ ones. Which are "zero-cost".

Related issue: #52533

Metadata

Metadata

Assignees

No one assigned

    Labels

    error handlingHandling of exceptions by Julia or the user

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions