Custom Query (132 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (31 - 33 of 132)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Ticket Resolution Summary Owner Reporter
#123 fixed libyaml parser hangs when reading all in one read from a TCP socket. xi pem@…

Reported by pem@…, 5 years ago.

Description

When setting a read handler (which uses read(2)) with yaml_parser_set_input() and reading from a socket descriptor, it happens that the entire yaml document is read in one call of the handler. This seems to confuse the parser (yaml_parser_load()) which calls the handler again, attempting to read more.

Forcing at least two packages from the client makes it work. The workaround was to make the client write and flush the leading "---" separately, and then dump the rest on the socket.

This is with libyaml 0.1.2. The client side is using SnakeYAML 1.1 (with java 1.6), both on openSuse 11.0.

#156 fixed libyaml fails to identify simple keys in very long files on 32-bit platforms xi ppelletier@…

Reported by ppelletier@…, 4 years ago.

Description

I have file which contains thousands of relatively short YAML documents, so the file is large (nearly a gigabyte) but the individual documents are not.

I can provide this file if necessary, but I'm not attaching it because it's so large (982M uncompressed, and still 45M when bzip2'ed).

I was getting this error:

Parser error: while parsing a block mapping at line 9259457, column 5
did not find expected key at line 9260367, column 5

This error occurs in both libyaml-0.1.2 and libyaml-0.1.3, but only on 32-bit machines (I tried Ubuntu 8.04 for x86-32, and Intel Mac OS X 10.5 with the compiler in 32-bit mode). If I parse the same file with libyaml on a 64-bit machine (e. g. Ubuntu 8.04 for x86-64), it parses successfully with no error.

I eventually tracked this problem down to an overflow in pointer arithmetic in yaml_parser_save_simple_key(), in yaml-0.1.3/src/scanner.c on line 1125. I changed this:

        simple_key.token_number = 
            parser->tokens_parsed + parser->tokens.tail - parser->tokens.head;

to this:

        simple_key.token_number = 
            parser->tokens_parsed + (parser->tokens.tail - parser->tokens.head);

which caused my file to be parsed successfully, even on 32-bit platforms. So, I would recommend adding this fix to libyaml-0.1.4. Thanks!

#71 wontfix libyaml does not build with MinGW xi clive.crous@…

Reported by clive.crous@…, 6 years ago.

Description

I'm unable to build libyaml under MinGW due to assumtions within the source code that "WIN32" means Visual Studio. I use gcc, even in windows.

Simple patch to yaml.h#260 fixes this =>

  • yaml.h

     
    2626 
    2727/** The public API declaration. */ 
    2828 
    29 #ifdef WIN32 
     29#if defined(WIN32) && !defined(__GNUC__) 
    3030#   if defined(YAML_DECLARE_STATIC) 
    3131#       define  YAML_DECLARE(type)  type 
    3232#   elif defined(YAML_DECLARE_EXPORT) 

Thanks, Clive

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Note: See TracQuery for help on using queries.