What steps will reproduce the problem?
1.compile the attached file and run
What is the expected output? What do you see instead?
Expected : generate test.yaml file with 2 entries, instead it crashes with
SIGSEGV
What version of the product are you using? On what operating system?
yaml-cpp 0.5.1
Red Hat Enterprise Linux Client release 5.9
Please provide any additional information below.
(gdb) b 14
Breakpoint 1 at 0x401279: file tut2.cpp, line 14.
(gdb) r
Starting program: ./yaml-cpp-master/sai/a.out
warning: no loadable sections found in added symbol-file system-supplied DSO at
0x2aaaaaaab000
Breakpoint 1, main () at tut2.cpp:14
14 out << "eggs";
(gdb) l
9 {
10 ofstream oFile ( "test.yaml" ); //
11 YAML::Emitter out;
12 // list
13 out << YAML::BeginSeq;
14 out << "eggs";
15 out << "bread";
16 //out << "milk";
17 out << YAML::EndSeq;
18 /*
(gdb) n
15 out << "bread";
(gdb) s
YAML::operator<< (emitter=..., v=0x41079f "bread") at
/proj/xhdhdstaff2/sainath/yaml-cpp-master/include/yaml-cpp/emitter.h:206
206 return emitter.Write(std::string(v));
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) quit
Original issue reported on code.google.com by sainathv...@gmail.com on 28 Jul 2015 at 11:21
Original issue reported on code.google.com by
sainathv...@gmail.com
on 28 Jul 2015 at 11:21Attachments: