Conversation
https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure Commenting out the assert makes the scanner do the right thing and results in just a simple parse failure.
This directory contains instructions and code for getting a libyaml development environment running.
repro: CFLAGS="-Wall -Wextra -Wunused-parameter -Wc++-compat" ./configure && make which we use for perl, and libyaml is now included in cperl. Tested with gcc-5 and clang-3.7 There are still a tons of format warnings (%d on 64bit) in example-deconstructor.c which I skipped.
add 2 new flags:
* problem_nonstrict to yaml_parser_t
* indentless_map to yaml_emitter_t
indentless_map is for backcompat with yaml readers.
It changes the default indent behavior of map elements,
advance the indent the children of the map
according to the spec: 6.1 Indentation Spaces:
"Each node must be indented further than its parent node. All sibling nodes
must use the exact same indentation level. However the content of each
sibling node may be further indented independently."
http://yaml.org/spec/1.2/spec.html#id2777534
This make it readable by YAML.pm (perl),
and behaves the same as all other YAML writers.
problem_nonstrict is to skip aborting on some reader errors:
"control characters are not allowed"
The error is set, but parsing is continued. This allows optionally
accepting invalid string values, copy-as-is, avoiding data-loss.
to be able to set breakpoints. also fix some pedantic warnings, remove unused code.
optionally allow certian reader errors. needed for perl YAML validation tests. See ingydotnet/yaml-libyaml-pm#44
Perl CPAN silently allows any unknown escape chars to pass them to regexp. Mimic that in nonstrict mode.
we cannot malloc to an anon struct in C++. typedef yaml_anchors_t
remove unneeded context, which is not set in any macro.
for void context, to fix -Wunused-value warnings
yaml_emitter_write_indicator const char *indicator
|
Hi @rurban! Thanks for collating all of this. It'd be easier to review, however, and would make our lives better if you could split this up into separate pull requests. Fixing compiler errors and warnings is fine, but tossing in new code atop that makes things very difficult to review. Please split these out. |
|
@sigmavirus24 no. I submitted these accumulated changes over the last year in various forms to the various proper upstream places. now this seems to be a new upstream. ingy promised to merge it for over a year now. |
detected by coverity
|
Just a note: @tlsa helped finding out that the I confirmed that with: vs. |
fix C++ g++-6/clang++-4 errors
Fixed most compiler warnings -Wall -Wextra
repro:
CFLAGS="-Wall -Wextra -Wunused-parameter -Wc++-compat" ./configure && make
add 2 new flags:
indentless_map is for backcompat with yaml readers.