Skip to content

Stack overflow when parsing larger yaml structures #26

Open
@jpsim

Description

Looks like the recursive nature of the parser makes it quite susceptible to stack overflows when parsing larger yaml structures. Not that ~500 lines is that large for a yaml file...

You can reproduce this by Yaml.loading this file, which causes a stack overflow on my mac (see this backtrace of ~900 YamlSwift stack frames).

I'm not familiar enough with the algorithm used here to avoid the recursion, which seems to be the only way to truly avoid this issue. Quite interested in hearing your thoughts @behrang!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions