malformed YAML crashes interpreter #728

Closed
danstowell opened this Issue Feb 16, 2013 · 4 comments

Comments

Projects
None yet
4 participants
Owner

danstowell commented Feb 16, 2013

The following crashes sclang:

    "{ heatMap: {   version: 1.0 } ".parseYAML

Note the lack of a closing brace.

Tried on 54d561c (master), Ubuntu 11.10.

Owner

jleben commented Feb 16, 2013

YAML throws exceptions when failing to parse. Probably the exception is not caught.
Dan, can you confirm this theory, or is there some other reason for the crash?

Owner

danstowell commented Feb 16, 2013

sc3> "{ heatMap: {   version: 1.0 } ".parseYAML
sclang: /home/dan/dev/supercollider/external_libraries/yaml-cpp-0.3.0/src/scanner.cpp:41: YAML::Token& YAML::Scanner::peek(): Assertion `!m_tokens.empty()' failed.
zsh: abort      sclang

Does this help? It's an assertion not an exception...

Contributor

timblechmann commented Feb 17, 2013

there is no chance we can catch an assertion failure inside an external library. but we could update libyamlcpp to version 0.5 or file a bug at upstream

Owner

telephon commented Mar 26, 2014

This has been fixed in the meantime, throws an Error as it should:

caught exception in primitive String:parseYAML
ERROR: yaml-cpp: error at line 7209058, column 6619247: end of map flow not foundERROR: Primitive '_String_ParseYAML' failed.

telephon closed this Mar 26, 2014

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