Subject: | perl_libyaml.c throws assertion on Load/LoadFile |
Date: | Wed, 20 Oct 2010 09:17:50 -0400 |
To: | bug-YAML-LibYAML [...] rt.cpan.org |
From: | MK <halfcountplus [...] intergate.com> |
A hash ref is saved thus:
YAML::XS::DumpFile($filepath, $hashref);
This 1000 byte file looks fine and dandy to me, but reloading it:
$Config = YAML::XS::LoadFile($filepath);
Generates:
Assertion ((key_node)->sv_flags & 0x00000400) failed: file
"perl_libyaml.c", line 265
at /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/YAML/XS.pm
line 48, <$IN> line 1.
This is version 0.34, which I've used casually before and never had an
issue. The same thing happens via Dump to string/Load to string,
appropriately enough, since YAML::XS::LoadFile just slurps and uses
YAML::XS::LibYAML::Load, which leads to the Assertion:
/* Get each key string and value node and put them in the hash */
while ((key_node = load_node(loader))) {
assert(SvPOK(key_node)); <---------------
value_node = load_node(loader);
hv_store_ent(
hash, key_node, value_node, 0
);
}
--
MK <halfcountplus@intergate.com>