Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (43 - 45 of 121)

Ticket Resolution Summary Owner Reporter
#89 invalid SIGSEGV if certain ints are not declared xi mzagrabe@…

Reported by mzagrabe@…, 5 years ago.

Description

The following program segfaults if any one of the integers:

canonical unicode k done

are not declared.

---------{ yaml_error.c begins }---------
#include <yaml.h>
#include <stdio.h>
#include <string.h>

int main()
{
/* Comment out 'canonical' to demonstrate segfault
  int canonical;
*/
  int unicode;
  int k;
  int done;

  yaml_parser_t parser;

  yaml_parser_initialize(&parser);
  yaml_parser_delete(&parser);
  return 0;
}
---------{ yaml_error.c ends }---------
% gcc -Wall -ggdb -c yaml_error.c && gcc -Wall -ggdb -lyaml -o yaml_error yaml_error.o
% gdb ./yaml_error
(gdb) run
Starting program: /home/mzagrabe/code/misc/c++/yaml/yaml_error 

Program received signal SIGSEGV, Segmentation fault.
0x08048514 in main () at yaml_error.c:19
19      }
(gdb) 

Running Debian Sid:

ii  libyaml-0-1      0.1.1-1
ii  libyaml-dev      0.1.1-1
ii  gcc              4:4.3.1-2
#4 fixed Inf and NaN handling needs re-vamp xi murphy@…

Reported by murphy@…, 7 years ago.

Description

Try:

yaml.load('...')

On Python 2.3.5 (on Windows) it gives:

>>> yaml.load('...')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "c:\Python\Lib\site-packages\yaml\__init__.py", line 73, in load
    return loader.get_data()
  File "c:\Python\Lib\site-packages\yaml\constructor.py", line 40, in get_data
    return self.construct_document(self.get_node())
  File "c:\Python\Lib\site-packages\yaml\composer.py", line 24, in get_node
    return self.compose_document()
  File "c:\Python\Lib\site-packages\yaml\composer.py", line 38, in compose_document
    self.get_event()
  File "c:\Python\Lib\site-packages\yaml\parser.py", line 102, in get_event
    self.current_event = self.event_generator.next()
  File "c:\Python\Lib\site-packages\yaml\parser.py", line 123, in parse_stream
    StreamEndToken):
  File "c:\Python\Lib\site-packages\yaml\scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "c:\Python\Lib\site-packages\yaml\scanner.py", line 191, in fetch_more_tokens
    if ch == u'.' and self.check_document_end():
  File "c:\Python\Lib\site-packages\yaml\scanner.py", line 704, in check_document_end
    prefix = self.peek(4)
  File "c:\Python\Lib\site-packages\yaml\reader.py", line 125, in peek
    return self.buffer[self.pointer+index]
IndexError: string index out of range
#60 fixed Error loading timestamps xi miki@…

Reported by miki@…, 6 years ago.

Description

Try the following script:

#!/usr/bin/env python

import syck
from datetime import datetime

for i in range(10000):
    now = datetime.now()
    dumped = syck.dump(now)
    loaded = syck.load(dumped)
    if now != loaded:
        print "original:", now
        print "result:", loaded
        print "dump:", dumped
        break

I get:

original: 2007-09-17 11:04:08.091612
result: 2007-09-17 11:04:08.916120
dump: --- !timestamp 2007-09-17T11:04:08.091612

The YAML looks OK, so the parsing is wrong.

Note: See TracQuery for help on using queries.