viking/r-yaml — Issue #2: yaml.load_file hangs when file has two anchors followed by an alias
Author: apshaar
Created: 2012-01-17 01:09:27+00:00
State: open

Hi viking,

Great R package, thanks for sharing it. Not sure if this is the proper venue for this (first github post), but thought I'd give it a try, to help you out and (hopefully) help me as well.

Under yaml package version 2.1.1 (R 2.14.1, OS X 10.6) when I load the following file with 'yaml.load_file("test.yaml")', the CPU spikes to 100% and the system just hangs, requiring me to kill the process (won't respond to command-C).

[begin 'test.yaml']
# Simple yaml file to try to identify the bug created by two reference anchors.
---
first: &tag
a: string

firstb: &tagb # removing this and the following line fixes the problem
a: string

second: *tag # removing this line solves the problem
...
[end 'test.yaml']

This problem did not exist back in package version 1.1.0, but now none of my configuration files will load (since they all have at least two anchors).

Best and thanks,
-apshaar