malformed YAML crashes interpreter #728

danstowell opened this Issue Feb 16, 2013 · 4 comments


None yet
4 participants

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.


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?


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...


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


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