Skip to content

Naked recursion segfaults the compiler #163

Description

@Hugobros3

The following snippet (written using AnyDSL/artic#23):

#[export]
fn main (a : i32) -> i32 {
    test(a)
}

fn test(a : i32) -> ! {
  test2(a)
}

fn test2(a : i32) -> ! {
  test(a)
}

Crashes the compiler because ETA-reduction in Importer is greedy and skips rebuilding test, only attempting to rebuild the callee test2, and then vice versa, endlessly up until we get a segfault.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions