Skip to content

try and die can cause infinite loop under some rare condition #519

@vrurg

Description

@vrurg

The bug was discovered in Perl6::Metamodel::MethodContainer role, add_method method while resolving rakudo/rakudo#2250. It turned out that the compiler is freezing due to infinite loop happening when nqp::die throws and the try block within it catches the exception (or whatever else happens internally) and passes the control back to the same die.

Unfortunately, I haven't managed to golf the code down. But in my fork of rakudo repository I have a tag try_die_loop with two commented out lines. Those lines would clearly demonstrate the issue when uncommented. For unexplainable reason these two lines doesn't cause same effect if replicated at any other location up the call stack.

Platform: This is nqp version 2018.12-84-g6cf6e9a72 built on MoarVM version 2018.12-45-ga9d02578a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting-for-userThis ticket requires an update from the submitter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions