Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser hangs if using an invalid yaml #1562

Closed
uramirez8707 opened this issue Aug 1, 2024 · 0 comments · Fixed by #1563
Closed

parser hangs if using an invalid yaml #1562

uramirez8707 opened this issue Aug 1, 2024 · 0 comments · Fixed by #1563

Comments

@uramirez8707
Copy link
Contributor

Describe the bug
If you have an invalid yaml such as

title:c384L49_esm5PIcontrol
baseDate: 1960 1 1 1 1 1 1
diag_files:
-    fileName: "atmos_daily"
     freq: 24
     frequnit: hours
     timeunit: days
     unlimdim: time

The parser hangs when trying to parse the file.

To Reproduce
Modify any of the parser unit tests to use an invalid yaml and you will see that the code hangs

Expected behavior
The parser should not hang, instead it should produce an error message

This can be done by checking the output to yaml_parser_scan. It will be 0 on error.

System Environment
This happens in any system

Additional context
Thanks @uwagura for bringing this up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant