Skip Menu |

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

Report information
The Basics
Id: 104490
Status: open
Priority: 0/
Queue: JSON-Tiny

People
Owner: Nobody in particular
Requestors: DBOOK [...] cpan.org
Cc:
AdminCc:

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



Subject: Test segfault under 5.8.9
The minimum version in meta for JSON::Tiny is specified as 5.8 but under 5.8.9 the t/20-mojo-json.t test segfaults, on line 255 (just as the comment says it will). # Huge string $bytes = encode_json ['a' x 32768]; is_deeply decode_json($bytes), ['a' x 32768], 'successful roundtrip (huge)'; # segfault under 5.8.x. Changing that test to a smaller string fixes the issue and all other tests pass. The problem seems to be somewhere above 26000 characters but I can't say if that is the same for all machines.
On 2015-05-17 22:58:27, DBOOK wrote: Show quoted text
> The minimum version in meta for JSON::Tiny is specified as 5.8 but > under 5.8.9 the t/20-mojo-json.t test segfaults, on line 255 (just as > the comment says it will). > > # Huge string > $bytes = encode_json ['a' x 32768]; > is_deeply decode_json($bytes), ['a' x 32768], 'successful roundtrip > (huge)'; # segfault under 5.8.x. > > Changing that test to a smaller string fixes the issue and all other > tests pass. The problem seems to be somewhere above 26000 characters > but I can't say if that is the same for all machines.
Just for the record: on freebsd 9.2 the limit for segfaults seems to be much higher, somewhere between 1,100,000 and 1,150,000 bytes. This still passes: perl5.8.9 -MTest::More=no_plan -MJSON::Tiny=encode_json,decode_json -e'$num=1_100_000; $bytes = encode_json ["a" x $num]; is_deeply decode_json($bytes), ["a" x $num], "successful roundtrip (huge)";'