libyaml icon indicating copy to clipboard operation
libyaml copied to clipboard

Loader cycles on large input

Open Totktonada opened this issue 1 year ago • 1 comments

How to reproduce:

$ cmake .
$ make
$ yes '{' | head -n 1048576 | tr -d '\n' > x.yaml
$ ./run-loader x.yaml

I don't know, but maybe it is the same problem as one found by fuzzing in #227.

Totktonada avatar Jul 29 '22 13:07 Totktonada

Maybe it is just very slow. I run it on 100K file instead of 1M one:

$ yes '{' | head -n 102400 | tr -d '\n' > 100k.yaml
$ time ./run-loader 100k.yaml 
[1] Loading '100k.yaml': FAILURE (0 documents)

real	0m58.257s
user	0m58.215s
sys	0m0.028s

Approx. 1750 symbols per second (for this particular case with deep nesting, of course).

Totktonada avatar Jul 29 '22 14:07 Totktonada