|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2016-06-04 17:49 UTC] bd808@php.net
-Assigned To:
+Assigned To: bd808
[2016-06-04 19:19 UTC] bd808@php.net
-Status: Assigned
+Status: Closed
[2016-06-04 19:19 UTC] bd808@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 16:00:01 2025 UTC |
Description: ------------ We are getting a segmentation fault parsing some yaml. Whenever using an alias on a referenced section, the parse breaks. basic: - &external {value: 22 } keylevel0: keylevel1: value: 1 keylevel1.1: keylevel2: &strange value: 2 <<: *external If no alias "&strange" is used, it works fine. If no reference "<<: *external" is used, it works fine too. It works as expected on PHP 5.6.12 with yaml-1.2.0. Test script: --------------- --TEST-- Test PECL strange alias bug --SKIPIF-- <?php if(!extension_loaded('yaml')) die('skip yaml n/a'); ?> --FILE-- <?php $yaml_code = <<<YAML basic: - &external {value: 22 } keylevel0: keylevel1: value: 1 keylevel1.1: keylevel2: &strange value: 2 <<: *external YAML; var_dump(yaml_parse($yaml_code)); ?> --EXPECT-- array(2) { ["basic"]=> array(1) { [0]=> array(1) { ["value"]=> int(22) } } ["keylevel0"]=> array(2) { ["keylevel1"]=> array(1) { ["value"]=> int(1) } ["keylevel1.1"]=> array(1) { ["keylevel2"]=> array(1) { ["value"]=> int(2) } } } }