Skip Menu |

This queue is for tickets about the JSON-XS CPAN distribution.

Report information
The Basics
Id: 118280
Status: resolved
Priority: 0/
Queue: JSON-XS

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc: schmorp [...] schmorp.de
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.02
Fixed in: 3.03



CC: schmorp [...] schmorp.de
Subject: Assertion failure (encode_json on string ref)
With debugging perls there's an assertion failure with the following JSON::XS call: $ perl5.24.0d -MJSON::XS -e 'encode_json \"foo"' perl5.24.0d: XS.xs:338: json_nonref: Assertion `((svtype)((_svstash)->sv_flags & 0xff)) >= SVt_PVMG' failed. [3] 16354 abort (core dumped) perl5.24.0d -MJSON::XS -e 'encode_json \"foo"' I see this on a Linux (perl 5.24.0) and a FreeBSD system (perl 5.22.1). This error is causing failures in the Search::Elasticsearch test suite, see https://github.com/elastic/elasticsearch-perl/issues/108 Cpanel::JSON::XS does not fail here: $ perl5.24.0d -MCpanel::JSON::XS -e 'encode_json \"foo"' cannot encode reference to scalar 'SCALAR(0xa311f0)' unless the scalar is 0 or 1 at -e line 1.
On 2016-10-06 14:08:34, SREZIC wrote: Show quoted text
> With debugging perls there's an assertion failure with the following > JSON::XS call: > > $ perl5.24.0d -MJSON::XS -e 'encode_json \"foo"' > perl5.24.0d: XS.xs:338: json_nonref: Assertion `((svtype)((_svstash)-
> >sv_flags & 0xff)) >= SVt_PVMG' failed.
> [3] 16354 abort (core dumped) perl5.24.0d -MJSON::XS -e > 'encode_json \"foo"' > > I see this on a Linux (perl 5.24.0) and a FreeBSD system (perl > 5.22.1). This error is causing failures in the Search::Elasticsearch > test suite, see https://github.com/elastic/elasticsearch- > perl/issues/108 > > Cpanel::JSON::XS does not fail here: > > $ perl5.24.0d -MCpanel::JSON::XS -e 'encode_json \"foo"' > cannot encode reference to scalar 'SCALAR(0xa311f0)' unless the scalar > is 0 or 1 at -e line 1.
Seems to be fixed in 3.03.