jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
5.1k stars 1.84k forks source link

Error: attempt to copy-construct an iterator from a singular iterator #716

Open dhaglin opened 5 years ago

dhaglin commented 5 years ago

I built YAML-CPP on an ubuntu (18.04.02) linux using g++ (version 7.4.0) with a debug build (-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC).

Based on this code I see on the YAML-CPP tutorial page:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Weeks, LF: Ryan Braun}"); for(YAML::const_iterator it=lineup.begin();it!=lineup.end();++it) { std::cout << "Playing at " << it->first.as() << " is " << it->second.as() << "\n"; }

I tried running this code:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Week s, LF: Ryan Braun}"); std::cout << "Got the lineup parsed\n"; // YAML::const_iterator it = lineup.begin(); lineup.begin(); std::cout << "Got a begin iterator\n";

And I got this outcome:

Got the lineup parsed /usr/include/c++/7/debug/safe_iterator.h:149: Error: attempt to copy-construct an iterator from a singular iterator.

Objects involved in the operation: iterator "this" @ 0x0x7fff4c9f75a8 { type = gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::__cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > > (mutable iterator); state = singular; } iterator "other" @ 0x0x7fff4c9f74d8 { type = gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > > (mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > >' @ 0x0x7fb5954236a0 } Aborted (core dumped)

jbeder commented 5 years ago

Can you run the unit tests bundled with the library?

On Thu, Jul 25, 2019 at 4:44 PM dhaglin notifications@github.com wrote:

I built YAML-CPP on an ubuntu (18.04.02) linux using g++ (version 7.4.0) with a debug build (-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC).

Based on this code I see on the YAML-CPP tutorial page:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Weeks, LF: Ryan Braun}"); for(YAML::const_iterator it=lineup.begin();it!=lineup.end();++it) { std::cout << "Playing at " << it->first.asstd::string() << " is " << it->second.asstd::string() << "\n"; }

I tried running this code:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Week s, LF: Ryan Braun}"); std::cout << "Got the lineup parsed\n"; // YAML::const_iterator it = lineup.begin(); lineup.begin(); std::cout << "Got a begin iterator\n";

And I got this outcome:

Got the lineup parsed /usr/include/c++/7/debug/safe_iterator.h:149: Error: attempt to copy-construct an iterator from a singular iterator.

Objects involved in the operation: iterator "this" @ 0x0x7fff4c9f75a8 { type = gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::__cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > > (mutable iterator); state = singular; } iterator "other" @ 0x0x7fff4c9f74d8 { type = gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > > (mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > >' @ 0x0x7fb5954236a0 } Aborted (core dumped)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBT42WTPW2UOXMOISELQBIGBPA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBSLHWA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICUBX66WY5Y37Y44UW7FTQBIGBPANCNFSM4IG6I4ZQ .

dhaglin commented 5 years ago

Hi Jesse,

Thank you for pursuing this issue. I’d love to be able to use this package but cannot as long as this error occurs.

If I add a bit of code to the CMakeLists.txt file:

set(yaml_cxx_flags ${CMAKE_CXX_FLAGS})

if(CMAKE_BUILD_TYPE STREQUAL "debug") set(yaml_cxx_flags "-D_GLIBCXX_DEBUG" ${yaml_cxx_flags}) endif()

Then this is what I see when running ctest:

$ ctest -V UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl Test project /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 1 Start 1: yaml-test

1: Test command: /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/test/run-tests 1: Test timeout computed to be: 9.99988e+06 1: [==========] Running 908 tests from 13 test cases. 1: [----------] Global test environment set-up. 1: [----------] 8 tests from OstreamWrapperTest 1: [ RUN ] OstreamWrapperTest.BufferNoWrite 1: [ OK ] OstreamWrapperTest.BufferNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteStr 1: [ OK ] OstreamWrapperTest.BufferWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteCStr 1: [ OK ] OstreamWrapperTest.BufferWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamNoWrite 1: [ OK ] OstreamWrapperTest.StreamNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteStr 1: [ OK ] OstreamWrapperTest.StreamWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteCStr 1: [ OK ] OstreamWrapperTest.StreamWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.Position 1: [ OK ] OstreamWrapperTest.Position (0 ms) 1: [ RUN ] OstreamWrapperTest.Comment 1: [ OK ] OstreamWrapperTest.Comment (0 ms) 1: [----------] 8 tests from OstreamWrapperTest (0 ms total) 1: 1: [----------] 12 tests from RegExTest 1: [ RUN ] RegExTest.Empty 1: [ OK ] RegExTest.Empty (0 ms) 1: [ RUN ] RegExTest.Range 1: [ OK ] RegExTest.Range (378 ms) 1: [ RUN ] RegExTest.EmptyString 1: [ OK ] RegExTest.EmptyString (0 ms) 1: [ RUN ] RegExTest.SingleCharacterString 1: [ OK ] RegExTest.SingleCharacterString (5 ms) 1: [ RUN ] RegExTest.MultiCharacterString 1: [ OK ] RegExTest.MultiCharacterString (0 ms) 1: [ RUN ] RegExTest.OperatorNot 1: [ OK ] RegExTest.OperatorNot (0 ms) 1: [ RUN ] RegExTest.OperatorOr 1: [ OK ] RegExTest.OperatorOr (800 ms) 1: [ RUN ] RegExTest.OperatorOrShortCircuits 1: [ OK ] RegExTest.OperatorOrShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorAnd 1: [ OK ] RegExTest.OperatorAnd (0 ms) 1: [ RUN ] RegExTest.OperatorAndShortCircuits 1: [ OK ] RegExTest.OperatorAndShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorPlus 1: [ OK ] RegExTest.OperatorPlus (0 ms) 1: [ RUN ] RegExTest.StringOr 1: [ OK ] RegExTest.StringOr (0 ms) 1: [----------] 12 tests from RegExTest (1183 ms total) 1: 1: [----------] 82 tests from EmitterTest 1: [ RUN ] EmitterTest.SimpleScalar 1: [ OK ] EmitterTest.SimpleScalar (1 ms) 1: [ RUN ] EmitterTest.SimpleQuotedScalar 1: [ OK ] EmitterTest.SimpleQuotedScalar (0 ms) 1: [ RUN ] EmitterTest.SimpleSeq 1: [ OK ] EmitterTest.SimpleSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowSeq 1: [ OK ] EmitterTest.SimpleFlowSeq (0 ms) 1: [ RUN ] EmitterTest.EmptyFlowSeq 1: [ OK ] EmitterTest.EmptyFlowSeq (0 ms) 1: [ RUN ] EmitterTest.NestedBlockSeq 1: [ OK ] EmitterTest.NestedBlockSeq (0 ms) 1: [ RUN ] EmitterTest.NestedFlowSeq 1: [ OK ] EmitterTest.NestedFlowSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleMap 1: [ OK ] EmitterTest.SimpleMap (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowMap 1: [ OK ] EmitterTest.SimpleFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapAndList 1: [ OK ] EmitterTest.MapAndList (1 ms) 1: [ RUN ] EmitterTest.ListAndMap 1: [ OK ] EmitterTest.ListAndMap (0 ms) 1: [ RUN ] EmitterTest.NestedBlockMap 1: [ OK ] EmitterTest.NestedBlockMap (0 ms) 1: [ RUN ] EmitterTest.NestedFlowMap 1: [ OK ] EmitterTest.NestedFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapListMix 1: [ OK ] EmitterTest.MapListMix (0 ms) 1: [ RUN ] EmitterTest.SimpleLongKey 1: [ OK ] EmitterTest.SimpleLongKey (0 ms) 1: [ RUN ] EmitterTest.SingleLongKey 1: [ OK ] EmitterTest.SingleLongKey (0 ms) 1: [ RUN ] EmitterTest.ComplexLongKey 1: [ OK ] EmitterTest.ComplexLongKey (0 ms) 1: [ RUN ] EmitterTest.AutoLongKey 1: [ OK ] EmitterTest.AutoLongKey (1 ms) 1: [ RUN ] EmitterTest.ScalarFormat 1: [ OK ] EmitterTest.ScalarFormat (0 ms) 1: [ RUN ] EmitterTest.AutoLongKeyScalar 1: [ OK ] EmitterTest.AutoLongKeyScalar (0 ms) 1: [ RUN ] EmitterTest.LongKeyFlowMap 1: [ OK ] EmitterTest.LongKeyFlowMap (0 ms) 1: [ RUN ] EmitterTest.BlockMapAsKey 1: [ OK ] EmitterTest.BlockMapAsKey (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchor 1: [ OK ] EmitterTest.AliasAndAnchor (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorWithNull 1: [ OK ] EmitterTest.AliasAndAnchorWithNull (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorInFlow 1: [ OK ] EmitterTest.AliasAndAnchorInFlow (0 ms) 1: [ RUN ] EmitterTest.SimpleVerbatimTag 1: [ OK ] EmitterTest.SimpleVerbatimTag (1 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockSeq 1: [ OK ] EmitterTest.VerbatimTagInBlockSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeq 1: [ OK ] EmitterTest.VerbatimTagInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeqWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowSeqWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockMap 1: [ OK ] EmitterTest.VerbatimTagInBlockMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMap 1: [ OK ] EmitterTest.VerbatimTagInFlowMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMapWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowMapWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeq 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptyMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptyMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeqAndMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeqAndMap (0 ms) 1: [ RUN ] EmitterTest.ByKindTagWithScalar 1: [ OK ] EmitterTest.ByKindTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.LocalTagWithScalar 1: [ OK ] EmitterTest.LocalTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.ComplexDoc 1: [ OK ] EmitterTest.ComplexDoc (1 ms) 1: [ RUN ] EmitterTest.STLContainers 1: [ OK ] EmitterTest.STLContainers (0 ms) 1: [ RUN ] EmitterTest.SimpleComment 1: [ OK ] EmitterTest.SimpleComment (0 ms) 1: [ RUN ] EmitterTest.MultiLineComment 1: [ OK ] EmitterTest.MultiLineComment (0 ms) 1: [ RUN ] EmitterTest.ComplexComments 1: [ OK ] EmitterTest.ComplexComments (0 ms) 1: [ RUN ] EmitterTest.InitialComment 1: [ OK ] EmitterTest.InitialComment (1 ms) 1: [ RUN ] EmitterTest.InitialCommentWithDocIndicator 1: [ OK ] EmitterTest.InitialCommentWithDocIndicator (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowSeq 1: [ OK ] EmitterTest.CommentInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowMap 1: [ OK ] EmitterTest.CommentInFlowMap (0 ms) 1: [ RUN ] EmitterTest.Indentation 1: [ OK ] EmitterTest.Indentation (0 ms) 1: [ RUN ] EmitterTest.SimpleGlobalSettings 1: [ OK ] EmitterTest.SimpleGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.ComplexGlobalSettings 1: [ OK ] EmitterTest.ComplexGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.Null 1: [ OK ] EmitterTest.Null (0 ms) 1: [ RUN ] EmitterTest.EscapedUnicode 1: [ OK ] EmitterTest.EscapedUnicode (0 ms) 1: [ RUN ] EmitterTest.Unicode 1: [ OK ] EmitterTest.Unicode (0 ms) 1: [ RUN ] EmitterTest.DoubleQuotedUnicode 1: [ OK ] EmitterTest.DoubleQuotedUnicode (0 ms) 1: [ RUN ] EmitterTest.UserType 1: [ OK ] EmitterTest.UserType (1 ms) 1: [ RUN ] EmitterTest.UserTypeInContainer 1: [ OK ] EmitterTest.UserTypeInContainer (0 ms) 1: [ RUN ] EmitterTest.PointerToInt 1: [ OK ] EmitterTest.PointerToInt (0 ms) 1: [ RUN ] EmitterTest.PointerToUserType 1: [ OK ] EmitterTest.PointerToUserType (0 ms) 1: [ RUN ] EmitterTest.NewlineAtEnd 1: [ OK ] EmitterTest.NewlineAtEnd (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockSequence 1: [ OK ] EmitterTest.NewlineInBlockSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowSequence 1: [ OK ] EmitterTest.NewlineInFlowSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockMap 1: [ OK ] EmitterTest.NewlineInBlockMap (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowMap 1: [ OK ] EmitterTest.NewlineInFlowMap (0 ms) 1: [ RUN ] EmitterTest.LotsOfNewlines 1: [ OK ] EmitterTest.LotsOfNewlines (0 ms) 1: [ RUN ] EmitterTest.Binary 1: [ OK ] EmitterTest.Binary (0 ms) 1: [ RUN ] EmitterTest.LongBinary 1: [ OK ] EmitterTest.LongBinary (1 ms) 1: [ RUN ] EmitterTest.EmptyBinary 1: [ OK ] EmitterTest.EmptyBinary (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalar 1: [ OK ] EmitterTest.ColonAtEndOfScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAsScalar 1: [ OK ] EmitterTest.ColonAsScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalarInFlow 1: [ OK ] EmitterTest.ColonAtEndOfScalarInFlow (0 ms) 1: [ RUN ] EmitterTest.BoolFormatting 1: [ OK ] EmitterTest.BoolFormatting (0 ms) 1: [ RUN ] EmitterTest.ImplicitDocStart 1: [ OK ] EmitterTest.ImplicitDocStart (0 ms) 1: [ RUN ] EmitterTest.EmptyString 1: [ OK ] EmitterTest.EmptyString (0 ms) 1: [ RUN ] EmitterTest.SingleChar 1: [ OK ] EmitterTest.SingleChar (0 ms) 1: [ RUN ] EmitterTest.DefaultPrecision 1: [ OK ] EmitterTest.DefaultPrecision (0 ms) 1: [ RUN ] EmitterTest.SetPrecision 1: [ OK ] EmitterTest.SetPrecision (0 ms) 1: [ RUN ] EmitterTest.DashInBlockContext 1: [ OK ] EmitterTest.DashInBlockContext (0 ms) 1: [ RUN ] EmitterTest.HexAndOct 1: [ OK ] EmitterTest.HexAndOct (0 ms) 1: [ RUN ] EmitterTest.CompactMapWithNewline 1: [ OK ] EmitterTest.CompactMapWithNewline (1 ms) 1: [ RUN ] EmitterTest.ForceSingleQuotedToDouble 1: [ OK ] EmitterTest.ForceSingleQuotedToDouble (0 ms) 1: [ RUN ] EmitterTest.QuoteNull 1: [ OK ] EmitterTest.QuoteNull (0 ms) 1: [ RUN ] EmitterTest.ValueOfDoubleQuote 1: [ OK ] EmitterTest.ValueOfDoubleQuote (0 ms) 1: [ RUN ] EmitterTest.ValueOfBackslash 1: [ OK ] EmitterTest.ValueOfBackslash (0 ms) 1: [----------] 82 tests from EmitterTest (9 ms total) 1: 1: [----------] 5 tests from EmitterErrorTest 1: [ RUN ] EmitterErrorTest.BadLocalTag 1: [ OK ] EmitterErrorTest.BadLocalTag (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndSeq 1: [ OK ] EmitterErrorTest.ExtraEndSeq (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndMap 1: [ OK ] EmitterErrorTest.ExtraEndMap (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAnchor 1: [ OK ] EmitterErrorTest.InvalidAnchor (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAlias 1: [ OK ] EmitterErrorTest.InvalidAlias (0 ms) 1: [----------] 5 tests from EmitterErrorTest (0 ms total) 1: 1: [----------] 10 tests from EncodingTest 1: [ RUN ] EncodingTest.UTF8_noBOM 1/1 Test #1: yaml-test ........................***Exception: SegFault 1.33 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 1.33 sec

The following tests FAILED: 1 - yaml-test (SEGFAULT) Errors while running CTest

On Jul 25, 2019, at 2:05 PM, Jesse Beder notifications@github.com wrote:

Can you run the unit tests bundled with the library?

On Thu, Jul 25, 2019 at 4:44 PM dhaglin notifications@github.com wrote:

I built YAML-CPP on an ubuntu (18.04.02) linux using g++ (version 7.4.0) with a debug build (-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC).

Based on this code I see on the YAML-CPP tutorial page:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Weeks, LF: Ryan Braun}"); for(YAML::const_iterator it=lineup.begin();it!=lineup.end();++it) { std::cout << "Playing at " << it->first.asstd::string() << " is " << it->second.asstd::string() << "\n"; }

I tried running this code:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Week s, LF: Ryan Braun}"); std::cout << "Got the lineup parsed\n"; // YAML::const_iterator it = lineup.begin(); lineup.begin(); std::cout << "Got a begin iterator\n";

And I got this outcome:

Got the lineup parsed /usr/include/c++/7/debug/safe_iterator.h:149: Error: attempt to copy-construct an iterator from a singular iterator.

Objects involved in the operation: iterator "this" @ 0x0x7fff4c9f75a8 { type = gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::__cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > > (mutable iterator); state = singular; } iterator "other" @ 0x0x7fff4c9f74d8 { type = gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > > (mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > >' @ 0x0x7fb5954236a0 } Aborted (core dumped)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBT42WTPW2UOXMOISELQBIGBPA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBSLHWA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICUBX66WY5Y37Y44UW7FTQBIGBPANCNFSM4IG6I4ZQ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AJC2RXK6CECKBTKHHAWOGN3QBIIQJA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22YWOI#issuecomment-515214137, or mute the thread https://github.com/notifications/unsubscribe-auth/AJC2RXJE2TLFO4GTWQSTRF3QBIIQJANCNFSM4IG6I4ZQ.

jbeder commented 5 years ago

If you don’t add anything to the CMake file, can you compile and run the tests?

On Fri, Jul 26, 2019 at 5:20 PM dhaglin notifications@github.com wrote:

Hi Jesse,

Thank you for pursuing this issue. I’d love to be able to use this package but cannot as long as this error occurs.

If I add a bit of code to the CMakeLists.txt file:

set(yaml_cxx_flags ${CMAKE_CXX_FLAGS})

if(CMAKE_BUILD_TYPE STREQUAL "debug") set(yaml_cxx_flags "-D_GLIBCXX_DEBUG" ${yaml_cxx_flags}) endif()

Then this is what I see when running ctest:

$ ctest -V UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl Test project /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 1 Start 1: yaml-test

1: Test command: /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/test/run-tests 1: Test timeout computed to be: 9.99988e+06 1: [==========] Running 908 tests from 13 test cases. 1: [----------] Global test environment set-up. 1: [----------] 8 tests from OstreamWrapperTest 1: [ RUN ] OstreamWrapperTest.BufferNoWrite 1: [ OK ] OstreamWrapperTest.BufferNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteStr 1: [ OK ] OstreamWrapperTest.BufferWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteCStr 1: [ OK ] OstreamWrapperTest.BufferWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamNoWrite 1: [ OK ] OstreamWrapperTest.StreamNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteStr 1: [ OK ] OstreamWrapperTest.StreamWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteCStr 1: [ OK ] OstreamWrapperTest.StreamWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.Position 1: [ OK ] OstreamWrapperTest.Position (0 ms) 1: [ RUN ] OstreamWrapperTest.Comment 1: [ OK ] OstreamWrapperTest.Comment (0 ms) 1: [----------] 8 tests from OstreamWrapperTest (0 ms total) 1: 1: [----------] 12 tests from RegExTest 1: [ RUN ] RegExTest.Empty 1: [ OK ] RegExTest.Empty (0 ms) 1: [ RUN ] RegExTest.Range 1: [ OK ] RegExTest.Range (378 ms) 1: [ RUN ] RegExTest.EmptyString 1: [ OK ] RegExTest.EmptyString (0 ms) 1: [ RUN ] RegExTest.SingleCharacterString 1: [ OK ] RegExTest.SingleCharacterString (5 ms) 1: [ RUN ] RegExTest.MultiCharacterString 1: [ OK ] RegExTest.MultiCharacterString (0 ms) 1: [ RUN ] RegExTest.OperatorNot 1: [ OK ] RegExTest.OperatorNot (0 ms) 1: [ RUN ] RegExTest.OperatorOr 1: [ OK ] RegExTest.OperatorOr (800 ms) 1: [ RUN ] RegExTest.OperatorOrShortCircuits 1: [ OK ] RegExTest.OperatorOrShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorAnd 1: [ OK ] RegExTest.OperatorAnd (0 ms) 1: [ RUN ] RegExTest.OperatorAndShortCircuits 1: [ OK ] RegExTest.OperatorAndShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorPlus 1: [ OK ] RegExTest.OperatorPlus (0 ms) 1: [ RUN ] RegExTest.StringOr 1: [ OK ] RegExTest.StringOr (0 ms) 1: [----------] 12 tests from RegExTest (1183 ms total) 1: 1: [----------] 82 tests from EmitterTest 1: [ RUN ] EmitterTest.SimpleScalar 1: [ OK ] EmitterTest.SimpleScalar (1 ms) 1: [ RUN ] EmitterTest.SimpleQuotedScalar 1: [ OK ] EmitterTest.SimpleQuotedScalar (0 ms) 1: [ RUN ] EmitterTest.SimpleSeq 1: [ OK ] EmitterTest.SimpleSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowSeq 1: [ OK ] EmitterTest.SimpleFlowSeq (0 ms) 1: [ RUN ] EmitterTest.EmptyFlowSeq 1: [ OK ] EmitterTest.EmptyFlowSeq (0 ms) 1: [ RUN ] EmitterTest.NestedBlockSeq 1: [ OK ] EmitterTest.NestedBlockSeq (0 ms) 1: [ RUN ] EmitterTest.NestedFlowSeq 1: [ OK ] EmitterTest.NestedFlowSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleMap 1: [ OK ] EmitterTest.SimpleMap (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowMap 1: [ OK ] EmitterTest.SimpleFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapAndList 1: [ OK ] EmitterTest.MapAndList (1 ms) 1: [ RUN ] EmitterTest.ListAndMap 1: [ OK ] EmitterTest.ListAndMap (0 ms) 1: [ RUN ] EmitterTest.NestedBlockMap 1: [ OK ] EmitterTest.NestedBlockMap (0 ms) 1: [ RUN ] EmitterTest.NestedFlowMap 1: [ OK ] EmitterTest.NestedFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapListMix 1: [ OK ] EmitterTest.MapListMix (0 ms) 1: [ RUN ] EmitterTest.SimpleLongKey 1: [ OK ] EmitterTest.SimpleLongKey (0 ms) 1: [ RUN ] EmitterTest.SingleLongKey 1: [ OK ] EmitterTest.SingleLongKey (0 ms) 1: [ RUN ] EmitterTest.ComplexLongKey 1: [ OK ] EmitterTest.ComplexLongKey (0 ms) 1: [ RUN ] EmitterTest.AutoLongKey 1: [ OK ] EmitterTest.AutoLongKey (1 ms) 1: [ RUN ] EmitterTest.ScalarFormat 1: [ OK ] EmitterTest.ScalarFormat (0 ms) 1: [ RUN ] EmitterTest.AutoLongKeyScalar 1: [ OK ] EmitterTest.AutoLongKeyScalar (0 ms) 1: [ RUN ] EmitterTest.LongKeyFlowMap 1: [ OK ] EmitterTest.LongKeyFlowMap (0 ms) 1: [ RUN ] EmitterTest.BlockMapAsKey 1: [ OK ] EmitterTest.BlockMapAsKey (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchor 1: [ OK ] EmitterTest.AliasAndAnchor (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorWithNull 1: [ OK ] EmitterTest.AliasAndAnchorWithNull (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorInFlow 1: [ OK ] EmitterTest.AliasAndAnchorInFlow (0 ms) 1: [ RUN ] EmitterTest.SimpleVerbatimTag 1: [ OK ] EmitterTest.SimpleVerbatimTag (1 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockSeq 1: [ OK ] EmitterTest.VerbatimTagInBlockSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeq 1: [ OK ] EmitterTest.VerbatimTagInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeqWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowSeqWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockMap 1: [ OK ] EmitterTest.VerbatimTagInBlockMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMap 1: [ OK ] EmitterTest.VerbatimTagInFlowMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMapWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowMapWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeq 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptyMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptyMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeqAndMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeqAndMap (0 ms) 1: [ RUN ] EmitterTest.ByKindTagWithScalar 1: [ OK ] EmitterTest.ByKindTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.LocalTagWithScalar 1: [ OK ] EmitterTest.LocalTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.ComplexDoc 1: [ OK ] EmitterTest.ComplexDoc (1 ms) 1: [ RUN ] EmitterTest.STLContainers 1: [ OK ] EmitterTest.STLContainers (0 ms) 1: [ RUN ] EmitterTest.SimpleComment 1: [ OK ] EmitterTest.SimpleComment (0 ms) 1: [ RUN ] EmitterTest.MultiLineComment 1: [ OK ] EmitterTest.MultiLineComment (0 ms) 1: [ RUN ] EmitterTest.ComplexComments 1: [ OK ] EmitterTest.ComplexComments (0 ms) 1: [ RUN ] EmitterTest.InitialComment 1: [ OK ] EmitterTest.InitialComment (1 ms) 1: [ RUN ] EmitterTest.InitialCommentWithDocIndicator 1: [ OK ] EmitterTest.InitialCommentWithDocIndicator (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowSeq 1: [ OK ] EmitterTest.CommentInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowMap 1: [ OK ] EmitterTest.CommentInFlowMap (0 ms) 1: [ RUN ] EmitterTest.Indentation 1: [ OK ] EmitterTest.Indentation (0 ms) 1: [ RUN ] EmitterTest.SimpleGlobalSettings 1: [ OK ] EmitterTest.SimpleGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.ComplexGlobalSettings 1: [ OK ] EmitterTest.ComplexGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.Null 1: [ OK ] EmitterTest.Null (0 ms) 1: [ RUN ] EmitterTest.EscapedUnicode 1: [ OK ] EmitterTest.EscapedUnicode (0 ms) 1: [ RUN ] EmitterTest.Unicode 1: [ OK ] EmitterTest.Unicode (0 ms) 1: [ RUN ] EmitterTest.DoubleQuotedUnicode 1: [ OK ] EmitterTest.DoubleQuotedUnicode (0 ms) 1: [ RUN ] EmitterTest.UserType 1: [ OK ] EmitterTest.UserType (1 ms) 1: [ RUN ] EmitterTest.UserTypeInContainer 1: [ OK ] EmitterTest.UserTypeInContainer (0 ms) 1: [ RUN ] EmitterTest.PointerToInt 1: [ OK ] EmitterTest.PointerToInt (0 ms) 1: [ RUN ] EmitterTest.PointerToUserType 1: [ OK ] EmitterTest.PointerToUserType (0 ms) 1: [ RUN ] EmitterTest.NewlineAtEnd 1: [ OK ] EmitterTest.NewlineAtEnd (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockSequence 1: [ OK ] EmitterTest.NewlineInBlockSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowSequence 1: [ OK ] EmitterTest.NewlineInFlowSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockMap 1: [ OK ] EmitterTest.NewlineInBlockMap (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowMap 1: [ OK ] EmitterTest.NewlineInFlowMap (0 ms) 1: [ RUN ] EmitterTest.LotsOfNewlines 1: [ OK ] EmitterTest.LotsOfNewlines (0 ms) 1: [ RUN ] EmitterTest.Binary 1: [ OK ] EmitterTest.Binary (0 ms) 1: [ RUN ] EmitterTest.LongBinary 1: [ OK ] EmitterTest.LongBinary (1 ms) 1: [ RUN ] EmitterTest.EmptyBinary 1: [ OK ] EmitterTest.EmptyBinary (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalar 1: [ OK ] EmitterTest.ColonAtEndOfScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAsScalar 1: [ OK ] EmitterTest.ColonAsScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalarInFlow 1: [ OK ] EmitterTest.ColonAtEndOfScalarInFlow (0 ms) 1: [ RUN ] EmitterTest.BoolFormatting 1: [ OK ] EmitterTest.BoolFormatting (0 ms) 1: [ RUN ] EmitterTest.ImplicitDocStart 1: [ OK ] EmitterTest.ImplicitDocStart (0 ms) 1: [ RUN ] EmitterTest.EmptyString 1: [ OK ] EmitterTest.EmptyString (0 ms) 1: [ RUN ] EmitterTest.SingleChar 1: [ OK ] EmitterTest.SingleChar (0 ms) 1: [ RUN ] EmitterTest.DefaultPrecision 1: [ OK ] EmitterTest.DefaultPrecision (0 ms) 1: [ RUN ] EmitterTest.SetPrecision 1: [ OK ] EmitterTest.SetPrecision (0 ms) 1: [ RUN ] EmitterTest.DashInBlockContext 1: [ OK ] EmitterTest.DashInBlockContext (0 ms) 1: [ RUN ] EmitterTest.HexAndOct 1: [ OK ] EmitterTest.HexAndOct (0 ms) 1: [ RUN ] EmitterTest.CompactMapWithNewline 1: [ OK ] EmitterTest.CompactMapWithNewline (1 ms) 1: [ RUN ] EmitterTest.ForceSingleQuotedToDouble 1: [ OK ] EmitterTest.ForceSingleQuotedToDouble (0 ms) 1: [ RUN ] EmitterTest.QuoteNull 1: [ OK ] EmitterTest.QuoteNull (0 ms) 1: [ RUN ] EmitterTest.ValueOfDoubleQuote 1: [ OK ] EmitterTest.ValueOfDoubleQuote (0 ms) 1: [ RUN ] EmitterTest.ValueOfBackslash 1: [ OK ] EmitterTest.ValueOfBackslash (0 ms) 1: [----------] 82 tests from EmitterTest (9 ms total) 1: 1: [----------] 5 tests from EmitterErrorTest 1: [ RUN ] EmitterErrorTest.BadLocalTag 1: [ OK ] EmitterErrorTest.BadLocalTag (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndSeq 1: [ OK ] EmitterErrorTest.ExtraEndSeq (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndMap 1: [ OK ] EmitterErrorTest.ExtraEndMap (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAnchor 1: [ OK ] EmitterErrorTest.InvalidAnchor (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAlias 1: [ OK ] EmitterErrorTest.InvalidAlias (0 ms) 1: [----------] 5 tests from EmitterErrorTest (0 ms total) 1: 1: [----------] 10 tests from EncodingTest 1: [ RUN ] EncodingTest.UTF8_noBOM 1/1 Test #1: yaml-test ........................***Exception: SegFault 1.33 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 1.33 sec

The following tests FAILED: 1 - yaml-test (SEGFAULT) Errors while running CTest

On Jul 25, 2019, at 2:05 PM, Jesse Beder notifications@github.com wrote:

Can you run the unit tests bundled with the library?

On Thu, Jul 25, 2019 at 4:44 PM dhaglin notifications@github.com wrote:

I built YAML-CPP on an ubuntu (18.04.02) linux using g++ (version 7.4.0) with a debug build (-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC).

Based on this code I see on the YAML-CPP tutorial page:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Weeks, LF: Ryan Braun}"); for(YAML::const_iterator it=lineup.begin();it!=lineup.end();++it) { std::cout << "Playing at " << it->first.asstd::string() << " is " << it->second.asstd::string() << "\n"; }

I tried running this code:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Week s, LF: Ryan Braun}"); std::cout << "Got the lineup parsed\n"; // YAML::const_iterator it = lineup.begin(); lineup.begin(); std::cout << "Got a begin iterator\n";

And I got this outcome:

Got the lineup parsed /usr/include/c++/7/debug/safe_iterator.h:149: Error: attempt to copy-construct an iterator from a singular iterator.

Objects involved in the operation: iterator "this" @ 0x0x7fff4c9f75a8 { type =

gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::__cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node*> > >

(mutable iterator); state = singular; } iterator "other" @ 0x0x7fff4c9f74d8 { type =

gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::__cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node*> > >

(mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > ' @ 0x0x7fb5954236a0 } Aborted (core dumped)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBT42WTPW2UOXMOISELQBIGBPA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBSLHWA , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAICUBX66WY5Y37Y44UW7FTQBIGBPANCNFSM4IG6I4ZQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AJC2RXK6CECKBTKHHAWOGN3QBIIQJA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22YWOI#issuecomment-515214137>, or mute the thread < https://github.com/notifications/unsubscribe-auth/AJC2RXJE2TLFO4GTWQSTRF3QBIIQJANCNFSM4IG6I4ZQ .

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBW3ZYE6OP65AGU5RXDQBNTBHA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25XUJI#issuecomment-515602981, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICUBWCJW4IRQNQBEUKOMDQBNTBHANCNFSM4IG6I4ZQ .

dhaglin commented 5 years ago

Yes, but that is not how we build our code.

Somewhere in your header files there is a creation of a singular iterator that is then copied somewhere else. We just couldn’t find it within a few hours of searching.

Sent from my iPhone

On Jul 26, 2019, at 2:39 PM, Jesse Beder notifications@github.com wrote:

If you don’t add anything to the CMake file, can you compile and run the tests?

On Fri, Jul 26, 2019 at 5:20 PM dhaglin notifications@github.com wrote:

Hi Jesse,

Thank you for pursuing this issue. I’d love to be able to use this package but cannot as long as this error occurs.

If I add a bit of code to the CMakeLists.txt file:

set(yaml_cxx_flags ${CMAKE_CXX_FLAGS})

if(CMAKE_BUILD_TYPE STREQUAL "debug") set(yaml_cxx_flags "-D_GLIBCXX_DEBUG" ${yaml_cxx_flags}) endif()

Then this is what I see when running ctest:

$ ctest -V UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl Test project /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 1 Start 1: yaml-test

1: Test command: /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/test/run-tests 1: Test timeout computed to be: 9.99988e+06 1: [==========] Running 908 tests from 13 test cases. 1: [----------] Global test environment set-up. 1: [----------] 8 tests from OstreamWrapperTest 1: [ RUN ] OstreamWrapperTest.BufferNoWrite 1: [ OK ] OstreamWrapperTest.BufferNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteStr 1: [ OK ] OstreamWrapperTest.BufferWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteCStr 1: [ OK ] OstreamWrapperTest.BufferWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamNoWrite 1: [ OK ] OstreamWrapperTest.StreamNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteStr 1: [ OK ] OstreamWrapperTest.StreamWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteCStr 1: [ OK ] OstreamWrapperTest.StreamWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.Position 1: [ OK ] OstreamWrapperTest.Position (0 ms) 1: [ RUN ] OstreamWrapperTest.Comment 1: [ OK ] OstreamWrapperTest.Comment (0 ms) 1: [----------] 8 tests from OstreamWrapperTest (0 ms total) 1: 1: [----------] 12 tests from RegExTest 1: [ RUN ] RegExTest.Empty 1: [ OK ] RegExTest.Empty (0 ms) 1: [ RUN ] RegExTest.Range 1: [ OK ] RegExTest.Range (378 ms) 1: [ RUN ] RegExTest.EmptyString 1: [ OK ] RegExTest.EmptyString (0 ms) 1: [ RUN ] RegExTest.SingleCharacterString 1: [ OK ] RegExTest.SingleCharacterString (5 ms) 1: [ RUN ] RegExTest.MultiCharacterString 1: [ OK ] RegExTest.MultiCharacterString (0 ms) 1: [ RUN ] RegExTest.OperatorNot 1: [ OK ] RegExTest.OperatorNot (0 ms) 1: [ RUN ] RegExTest.OperatorOr 1: [ OK ] RegExTest.OperatorOr (800 ms) 1: [ RUN ] RegExTest.OperatorOrShortCircuits 1: [ OK ] RegExTest.OperatorOrShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorAnd 1: [ OK ] RegExTest.OperatorAnd (0 ms) 1: [ RUN ] RegExTest.OperatorAndShortCircuits 1: [ OK ] RegExTest.OperatorAndShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorPlus 1: [ OK ] RegExTest.OperatorPlus (0 ms) 1: [ RUN ] RegExTest.StringOr 1: [ OK ] RegExTest.StringOr (0 ms) 1: [----------] 12 tests from RegExTest (1183 ms total) 1: 1: [----------] 82 tests from EmitterTest 1: [ RUN ] EmitterTest.SimpleScalar 1: [ OK ] EmitterTest.SimpleScalar (1 ms) 1: [ RUN ] EmitterTest.SimpleQuotedScalar 1: [ OK ] EmitterTest.SimpleQuotedScalar (0 ms) 1: [ RUN ] EmitterTest.SimpleSeq 1: [ OK ] EmitterTest.SimpleSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowSeq 1: [ OK ] EmitterTest.SimpleFlowSeq (0 ms) 1: [ RUN ] EmitterTest.EmptyFlowSeq 1: [ OK ] EmitterTest.EmptyFlowSeq (0 ms) 1: [ RUN ] EmitterTest.NestedBlockSeq 1: [ OK ] EmitterTest.NestedBlockSeq (0 ms) 1: [ RUN ] EmitterTest.NestedFlowSeq 1: [ OK ] EmitterTest.NestedFlowSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleMap 1: [ OK ] EmitterTest.SimpleMap (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowMap 1: [ OK ] EmitterTest.SimpleFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapAndList 1: [ OK ] EmitterTest.MapAndList (1 ms) 1: [ RUN ] EmitterTest.ListAndMap 1: [ OK ] EmitterTest.ListAndMap (0 ms) 1: [ RUN ] EmitterTest.NestedBlockMap 1: [ OK ] EmitterTest.NestedBlockMap (0 ms) 1: [ RUN ] EmitterTest.NestedFlowMap 1: [ OK ] EmitterTest.NestedFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapListMix 1: [ OK ] EmitterTest.MapListMix (0 ms) 1: [ RUN ] EmitterTest.SimpleLongKey 1: [ OK ] EmitterTest.SimpleLongKey (0 ms) 1: [ RUN ] EmitterTest.SingleLongKey 1: [ OK ] EmitterTest.SingleLongKey (0 ms) 1: [ RUN ] EmitterTest.ComplexLongKey 1: [ OK ] EmitterTest.ComplexLongKey (0 ms) 1: [ RUN ] EmitterTest.AutoLongKey 1: [ OK ] EmitterTest.AutoLongKey (1 ms) 1: [ RUN ] EmitterTest.ScalarFormat 1: [ OK ] EmitterTest.ScalarFormat (0 ms) 1: [ RUN ] EmitterTest.AutoLongKeyScalar 1: [ OK ] EmitterTest.AutoLongKeyScalar (0 ms) 1: [ RUN ] EmitterTest.LongKeyFlowMap 1: [ OK ] EmitterTest.LongKeyFlowMap (0 ms) 1: [ RUN ] EmitterTest.BlockMapAsKey 1: [ OK ] EmitterTest.BlockMapAsKey (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchor 1: [ OK ] EmitterTest.AliasAndAnchor (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorWithNull 1: [ OK ] EmitterTest.AliasAndAnchorWithNull (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorInFlow 1: [ OK ] EmitterTest.AliasAndAnchorInFlow (0 ms) 1: [ RUN ] EmitterTest.SimpleVerbatimTag 1: [ OK ] EmitterTest.SimpleVerbatimTag (1 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockSeq 1: [ OK ] EmitterTest.VerbatimTagInBlockSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeq 1: [ OK ] EmitterTest.VerbatimTagInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeqWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowSeqWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockMap 1: [ OK ] EmitterTest.VerbatimTagInBlockMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMap 1: [ OK ] EmitterTest.VerbatimTagInFlowMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMapWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowMapWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeq 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptyMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptyMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeqAndMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeqAndMap (0 ms) 1: [ RUN ] EmitterTest.ByKindTagWithScalar 1: [ OK ] EmitterTest.ByKindTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.LocalTagWithScalar 1: [ OK ] EmitterTest.LocalTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.ComplexDoc 1: [ OK ] EmitterTest.ComplexDoc (1 ms) 1: [ RUN ] EmitterTest.STLContainers 1: [ OK ] EmitterTest.STLContainers (0 ms) 1: [ RUN ] EmitterTest.SimpleComment 1: [ OK ] EmitterTest.SimpleComment (0 ms) 1: [ RUN ] EmitterTest.MultiLineComment 1: [ OK ] EmitterTest.MultiLineComment (0 ms) 1: [ RUN ] EmitterTest.ComplexComments 1: [ OK ] EmitterTest.ComplexComments (0 ms) 1: [ RUN ] EmitterTest.InitialComment 1: [ OK ] EmitterTest.InitialComment (1 ms) 1: [ RUN ] EmitterTest.InitialCommentWithDocIndicator 1: [ OK ] EmitterTest.InitialCommentWithDocIndicator (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowSeq 1: [ OK ] EmitterTest.CommentInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowMap 1: [ OK ] EmitterTest.CommentInFlowMap (0 ms) 1: [ RUN ] EmitterTest.Indentation 1: [ OK ] EmitterTest.Indentation (0 ms) 1: [ RUN ] EmitterTest.SimpleGlobalSettings 1: [ OK ] EmitterTest.SimpleGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.ComplexGlobalSettings 1: [ OK ] EmitterTest.ComplexGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.Null 1: [ OK ] EmitterTest.Null (0 ms) 1: [ RUN ] EmitterTest.EscapedUnicode 1: [ OK ] EmitterTest.EscapedUnicode (0 ms) 1: [ RUN ] EmitterTest.Unicode 1: [ OK ] EmitterTest.Unicode (0 ms) 1: [ RUN ] EmitterTest.DoubleQuotedUnicode 1: [ OK ] EmitterTest.DoubleQuotedUnicode (0 ms) 1: [ RUN ] EmitterTest.UserType 1: [ OK ] EmitterTest.UserType (1 ms) 1: [ RUN ] EmitterTest.UserTypeInContainer 1: [ OK ] EmitterTest.UserTypeInContainer (0 ms) 1: [ RUN ] EmitterTest.PointerToInt 1: [ OK ] EmitterTest.PointerToInt (0 ms) 1: [ RUN ] EmitterTest.PointerToUserType 1: [ OK ] EmitterTest.PointerToUserType (0 ms) 1: [ RUN ] EmitterTest.NewlineAtEnd 1: [ OK ] EmitterTest.NewlineAtEnd (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockSequence 1: [ OK ] EmitterTest.NewlineInBlockSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowSequence 1: [ OK ] EmitterTest.NewlineInFlowSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockMap 1: [ OK ] EmitterTest.NewlineInBlockMap (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowMap 1: [ OK ] EmitterTest.NewlineInFlowMap (0 ms) 1: [ RUN ] EmitterTest.LotsOfNewlines 1: [ OK ] EmitterTest.LotsOfNewlines (0 ms) 1: [ RUN ] EmitterTest.Binary 1: [ OK ] EmitterTest.Binary (0 ms) 1: [ RUN ] EmitterTest.LongBinary 1: [ OK ] EmitterTest.LongBinary (1 ms) 1: [ RUN ] EmitterTest.EmptyBinary 1: [ OK ] EmitterTest.EmptyBinary (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalar 1: [ OK ] EmitterTest.ColonAtEndOfScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAsScalar 1: [ OK ] EmitterTest.ColonAsScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalarInFlow 1: [ OK ] EmitterTest.ColonAtEndOfScalarInFlow (0 ms) 1: [ RUN ] EmitterTest.BoolFormatting 1: [ OK ] EmitterTest.BoolFormatting (0 ms) 1: [ RUN ] EmitterTest.ImplicitDocStart 1: [ OK ] EmitterTest.ImplicitDocStart (0 ms) 1: [ RUN ] EmitterTest.EmptyString 1: [ OK ] EmitterTest.EmptyString (0 ms) 1: [ RUN ] EmitterTest.SingleChar 1: [ OK ] EmitterTest.SingleChar (0 ms) 1: [ RUN ] EmitterTest.DefaultPrecision 1: [ OK ] EmitterTest.DefaultPrecision (0 ms) 1: [ RUN ] EmitterTest.SetPrecision 1: [ OK ] EmitterTest.SetPrecision (0 ms) 1: [ RUN ] EmitterTest.DashInBlockContext 1: [ OK ] EmitterTest.DashInBlockContext (0 ms) 1: [ RUN ] EmitterTest.HexAndOct 1: [ OK ] EmitterTest.HexAndOct (0 ms) 1: [ RUN ] EmitterTest.CompactMapWithNewline 1: [ OK ] EmitterTest.CompactMapWithNewline (1 ms) 1: [ RUN ] EmitterTest.ForceSingleQuotedToDouble 1: [ OK ] EmitterTest.ForceSingleQuotedToDouble (0 ms) 1: [ RUN ] EmitterTest.QuoteNull 1: [ OK ] EmitterTest.QuoteNull (0 ms) 1: [ RUN ] EmitterTest.ValueOfDoubleQuote 1: [ OK ] EmitterTest.ValueOfDoubleQuote (0 ms) 1: [ RUN ] EmitterTest.ValueOfBackslash 1: [ OK ] EmitterTest.ValueOfBackslash (0 ms) 1: [----------] 82 tests from EmitterTest (9 ms total) 1: 1: [----------] 5 tests from EmitterErrorTest 1: [ RUN ] EmitterErrorTest.BadLocalTag 1: [ OK ] EmitterErrorTest.BadLocalTag (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndSeq 1: [ OK ] EmitterErrorTest.ExtraEndSeq (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndMap 1: [ OK ] EmitterErrorTest.ExtraEndMap (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAnchor 1: [ OK ] EmitterErrorTest.InvalidAnchor (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAlias 1: [ OK ] EmitterErrorTest.InvalidAlias (0 ms) 1: [----------] 5 tests from EmitterErrorTest (0 ms total) 1: 1: [----------] 10 tests from EncodingTest 1: [ RUN ] EncodingTest.UTF8_noBOM 1/1 Test #1: yaml-test ........................***Exception: SegFault 1.33 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 1.33 sec

The following tests FAILED: 1 - yaml-test (SEGFAULT) Errors while running CTest

On Jul 25, 2019, at 2:05 PM, Jesse Beder notifications@github.com wrote:

Can you run the unit tests bundled with the library?

On Thu, Jul 25, 2019 at 4:44 PM dhaglin notifications@github.com wrote:

I built YAML-CPP on an ubuntu (18.04.02) linux using g++ (version 7.4.0) with a debug build (-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC).

Based on this code I see on the YAML-CPP tutorial page:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Weeks, LF: Ryan Braun}"); for(YAML::const_iterator it=lineup.begin();it!=lineup.end();++it) { std::cout << "Playing at " << it->first.asstd::string() << " is " << it->second.asstd::string() << "\n"; }

I tried running this code:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Week s, LF: Ryan Braun}"); std::cout << "Got the lineup parsed\n"; // YAML::const_iterator it = lineup.begin(); lineup.begin(); std::cout << "Got a begin iterator\n";

And I got this outcome:

Got the lineup parsed /usr/include/c++/7/debug/safe_iterator.h:149: Error: attempt to copy-construct an iterator from a singular iterator.

Objects involved in the operation: iterator "this" @ 0x0x7fff4c9f75a8 { type =

gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::__cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node*> > >

(mutable iterator); state = singular; } iterator "other" @ 0x0x7fff4c9f74d8 { type =

gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node, YAML::detail::node>, std::__cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node*> > >

(mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > ' @ 0x0x7fb5954236a0 } Aborted (core dumped)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBT42WTPW2UOXMOISELQBIGBPA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBSLHWA , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAICUBX66WY5Y37Y44UW7FTQBIGBPANCNFSM4IG6I4ZQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AJC2RXK6CECKBTKHHAWOGN3QBIIQJA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22YWOI#issuecomment-515214137>, or mute the thread < https://github.com/notifications/unsubscribe-auth/AJC2RXJE2TLFO4GTWQSTRF3QBIIQJANCNFSM4IG6I4ZQ .

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBW3ZYE6OP65AGU5RXDQBNTBHA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25XUJI#issuecomment-515602981, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICUBWCJW4IRQNQBEUKOMDQBNTBHANCNFSM4IG6I4ZQ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jbeder commented 5 years ago

I see. It sounds like there are two issues, which are maybe the same:

  1. When you run the sample code you wrote, you get the "singular iterator" exception at runtime.
  2. When you run the tests, you get a segfault in EncodingTest.UTF8_noBOM (I think?)

Both only happen when you add -D_GLIBCXX_DEBUG, and do not happen at HEAD of the repo.

Is this correct?

On Fri, Jul 26, 2019 at 6:07 PM dhaglin notifications@github.com wrote:

Yes, but that is not how we build our code.

Somewhere in your header files there is a creation of a singular iterator that is then copied somewhere else. We just couldn’t find it within a few hours of searching.

Sent from my iPhone

On Jul 26, 2019, at 2:39 PM, Jesse Beder notifications@github.com wrote:

If you don’t add anything to the CMake file, can you compile and run the tests?

On Fri, Jul 26, 2019 at 5:20 PM dhaglin notifications@github.com wrote:

Hi Jesse,

Thank you for pursuing this issue. I’d love to be able to use this package but cannot as long as this error occurs.

If I add a bit of code to the CMakeLists.txt file:

set(yaml_cxx_flags ${CMAKE_CXX_FLAGS})

if(CMAKE_BUILD_TYPE STREQUAL "debug") set(yaml_cxx_flags "-D_GLIBCXX_DEBUG" ${yaml_cxx_flags}) endif()

Then this is what I see when running ctest:

$ ctest -V UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl Test project /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 1 Start 1: yaml-test

1: Test command: /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/test/run-tests 1: Test timeout computed to be: 9.99988e+06 1: [==========] Running 908 tests from 13 test cases. 1: [----------] Global test environment set-up. 1: [----------] 8 tests from OstreamWrapperTest 1: [ RUN ] OstreamWrapperTest.BufferNoWrite 1: [ OK ] OstreamWrapperTest.BufferNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteStr 1: [ OK ] OstreamWrapperTest.BufferWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteCStr 1: [ OK ] OstreamWrapperTest.BufferWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamNoWrite 1: [ OK ] OstreamWrapperTest.StreamNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteStr 1: [ OK ] OstreamWrapperTest.StreamWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteCStr 1: [ OK ] OstreamWrapperTest.StreamWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.Position 1: [ OK ] OstreamWrapperTest.Position (0 ms) 1: [ RUN ] OstreamWrapperTest.Comment 1: [ OK ] OstreamWrapperTest.Comment (0 ms) 1: [----------] 8 tests from OstreamWrapperTest (0 ms total) 1: 1: [----------] 12 tests from RegExTest 1: [ RUN ] RegExTest.Empty 1: [ OK ] RegExTest.Empty (0 ms) 1: [ RUN ] RegExTest.Range 1: [ OK ] RegExTest.Range (378 ms) 1: [ RUN ] RegExTest.EmptyString 1: [ OK ] RegExTest.EmptyString (0 ms) 1: [ RUN ] RegExTest.SingleCharacterString 1: [ OK ] RegExTest.SingleCharacterString (5 ms) 1: [ RUN ] RegExTest.MultiCharacterString 1: [ OK ] RegExTest.MultiCharacterString (0 ms) 1: [ RUN ] RegExTest.OperatorNot 1: [ OK ] RegExTest.OperatorNot (0 ms) 1: [ RUN ] RegExTest.OperatorOr 1: [ OK ] RegExTest.OperatorOr (800 ms) 1: [ RUN ] RegExTest.OperatorOrShortCircuits 1: [ OK ] RegExTest.OperatorOrShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorAnd 1: [ OK ] RegExTest.OperatorAnd (0 ms) 1: [ RUN ] RegExTest.OperatorAndShortCircuits 1: [ OK ] RegExTest.OperatorAndShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorPlus 1: [ OK ] RegExTest.OperatorPlus (0 ms) 1: [ RUN ] RegExTest.StringOr 1: [ OK ] RegExTest.StringOr (0 ms) 1: [----------] 12 tests from RegExTest (1183 ms total) 1: 1: [----------] 82 tests from EmitterTest 1: [ RUN ] EmitterTest.SimpleScalar 1: [ OK ] EmitterTest.SimpleScalar (1 ms) 1: [ RUN ] EmitterTest.SimpleQuotedScalar 1: [ OK ] EmitterTest.SimpleQuotedScalar (0 ms) 1: [ RUN ] EmitterTest.SimpleSeq 1: [ OK ] EmitterTest.SimpleSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowSeq 1: [ OK ] EmitterTest.SimpleFlowSeq (0 ms) 1: [ RUN ] EmitterTest.EmptyFlowSeq 1: [ OK ] EmitterTest.EmptyFlowSeq (0 ms) 1: [ RUN ] EmitterTest.NestedBlockSeq 1: [ OK ] EmitterTest.NestedBlockSeq (0 ms) 1: [ RUN ] EmitterTest.NestedFlowSeq 1: [ OK ] EmitterTest.NestedFlowSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleMap 1: [ OK ] EmitterTest.SimpleMap (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowMap 1: [ OK ] EmitterTest.SimpleFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapAndList 1: [ OK ] EmitterTest.MapAndList (1 ms) 1: [ RUN ] EmitterTest.ListAndMap 1: [ OK ] EmitterTest.ListAndMap (0 ms) 1: [ RUN ] EmitterTest.NestedBlockMap 1: [ OK ] EmitterTest.NestedBlockMap (0 ms) 1: [ RUN ] EmitterTest.NestedFlowMap 1: [ OK ] EmitterTest.NestedFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapListMix 1: [ OK ] EmitterTest.MapListMix (0 ms) 1: [ RUN ] EmitterTest.SimpleLongKey 1: [ OK ] EmitterTest.SimpleLongKey (0 ms) 1: [ RUN ] EmitterTest.SingleLongKey 1: [ OK ] EmitterTest.SingleLongKey (0 ms) 1: [ RUN ] EmitterTest.ComplexLongKey 1: [ OK ] EmitterTest.ComplexLongKey (0 ms) 1: [ RUN ] EmitterTest.AutoLongKey 1: [ OK ] EmitterTest.AutoLongKey (1 ms) 1: [ RUN ] EmitterTest.ScalarFormat 1: [ OK ] EmitterTest.ScalarFormat (0 ms) 1: [ RUN ] EmitterTest.AutoLongKeyScalar 1: [ OK ] EmitterTest.AutoLongKeyScalar (0 ms) 1: [ RUN ] EmitterTest.LongKeyFlowMap 1: [ OK ] EmitterTest.LongKeyFlowMap (0 ms) 1: [ RUN ] EmitterTest.BlockMapAsKey 1: [ OK ] EmitterTest.BlockMapAsKey (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchor 1: [ OK ] EmitterTest.AliasAndAnchor (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorWithNull 1: [ OK ] EmitterTest.AliasAndAnchorWithNull (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorInFlow 1: [ OK ] EmitterTest.AliasAndAnchorInFlow (0 ms) 1: [ RUN ] EmitterTest.SimpleVerbatimTag 1: [ OK ] EmitterTest.SimpleVerbatimTag (1 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockSeq 1: [ OK ] EmitterTest.VerbatimTagInBlockSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeq 1: [ OK ] EmitterTest.VerbatimTagInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeqWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowSeqWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockMap 1: [ OK ] EmitterTest.VerbatimTagInBlockMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMap 1: [ OK ] EmitterTest.VerbatimTagInFlowMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMapWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowMapWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeq 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptyMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptyMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeqAndMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeqAndMap (0 ms) 1: [ RUN ] EmitterTest.ByKindTagWithScalar 1: [ OK ] EmitterTest.ByKindTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.LocalTagWithScalar 1: [ OK ] EmitterTest.LocalTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.ComplexDoc 1: [ OK ] EmitterTest.ComplexDoc (1 ms) 1: [ RUN ] EmitterTest.STLContainers 1: [ OK ] EmitterTest.STLContainers (0 ms) 1: [ RUN ] EmitterTest.SimpleComment 1: [ OK ] EmitterTest.SimpleComment (0 ms) 1: [ RUN ] EmitterTest.MultiLineComment 1: [ OK ] EmitterTest.MultiLineComment (0 ms) 1: [ RUN ] EmitterTest.ComplexComments 1: [ OK ] EmitterTest.ComplexComments (0 ms) 1: [ RUN ] EmitterTest.InitialComment 1: [ OK ] EmitterTest.InitialComment (1 ms) 1: [ RUN ] EmitterTest.InitialCommentWithDocIndicator 1: [ OK ] EmitterTest.InitialCommentWithDocIndicator (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowSeq 1: [ OK ] EmitterTest.CommentInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowMap 1: [ OK ] EmitterTest.CommentInFlowMap (0 ms) 1: [ RUN ] EmitterTest.Indentation 1: [ OK ] EmitterTest.Indentation (0 ms) 1: [ RUN ] EmitterTest.SimpleGlobalSettings 1: [ OK ] EmitterTest.SimpleGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.ComplexGlobalSettings 1: [ OK ] EmitterTest.ComplexGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.Null 1: [ OK ] EmitterTest.Null (0 ms) 1: [ RUN ] EmitterTest.EscapedUnicode 1: [ OK ] EmitterTest.EscapedUnicode (0 ms) 1: [ RUN ] EmitterTest.Unicode 1: [ OK ] EmitterTest.Unicode (0 ms) 1: [ RUN ] EmitterTest.DoubleQuotedUnicode 1: [ OK ] EmitterTest.DoubleQuotedUnicode (0 ms) 1: [ RUN ] EmitterTest.UserType 1: [ OK ] EmitterTest.UserType (1 ms) 1: [ RUN ] EmitterTest.UserTypeInContainer 1: [ OK ] EmitterTest.UserTypeInContainer (0 ms) 1: [ RUN ] EmitterTest.PointerToInt 1: [ OK ] EmitterTest.PointerToInt (0 ms) 1: [ RUN ] EmitterTest.PointerToUserType 1: [ OK ] EmitterTest.PointerToUserType (0 ms) 1: [ RUN ] EmitterTest.NewlineAtEnd 1: [ OK ] EmitterTest.NewlineAtEnd (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockSequence 1: [ OK ] EmitterTest.NewlineInBlockSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowSequence 1: [ OK ] EmitterTest.NewlineInFlowSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockMap 1: [ OK ] EmitterTest.NewlineInBlockMap (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowMap 1: [ OK ] EmitterTest.NewlineInFlowMap (0 ms) 1: [ RUN ] EmitterTest.LotsOfNewlines 1: [ OK ] EmitterTest.LotsOfNewlines (0 ms) 1: [ RUN ] EmitterTest.Binary 1: [ OK ] EmitterTest.Binary (0 ms) 1: [ RUN ] EmitterTest.LongBinary 1: [ OK ] EmitterTest.LongBinary (1 ms) 1: [ RUN ] EmitterTest.EmptyBinary 1: [ OK ] EmitterTest.EmptyBinary (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalar 1: [ OK ] EmitterTest.ColonAtEndOfScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAsScalar 1: [ OK ] EmitterTest.ColonAsScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalarInFlow 1: [ OK ] EmitterTest.ColonAtEndOfScalarInFlow (0 ms) 1: [ RUN ] EmitterTest.BoolFormatting 1: [ OK ] EmitterTest.BoolFormatting (0 ms) 1: [ RUN ] EmitterTest.ImplicitDocStart 1: [ OK ] EmitterTest.ImplicitDocStart (0 ms) 1: [ RUN ] EmitterTest.EmptyString 1: [ OK ] EmitterTest.EmptyString (0 ms) 1: [ RUN ] EmitterTest.SingleChar 1: [ OK ] EmitterTest.SingleChar (0 ms) 1: [ RUN ] EmitterTest.DefaultPrecision 1: [ OK ] EmitterTest.DefaultPrecision (0 ms) 1: [ RUN ] EmitterTest.SetPrecision 1: [ OK ] EmitterTest.SetPrecision (0 ms) 1: [ RUN ] EmitterTest.DashInBlockContext 1: [ OK ] EmitterTest.DashInBlockContext (0 ms) 1: [ RUN ] EmitterTest.HexAndOct 1: [ OK ] EmitterTest.HexAndOct (0 ms) 1: [ RUN ] EmitterTest.CompactMapWithNewline 1: [ OK ] EmitterTest.CompactMapWithNewline (1 ms) 1: [ RUN ] EmitterTest.ForceSingleQuotedToDouble 1: [ OK ] EmitterTest.ForceSingleQuotedToDouble (0 ms) 1: [ RUN ] EmitterTest.QuoteNull 1: [ OK ] EmitterTest.QuoteNull (0 ms) 1: [ RUN ] EmitterTest.ValueOfDoubleQuote 1: [ OK ] EmitterTest.ValueOfDoubleQuote (0 ms) 1: [ RUN ] EmitterTest.ValueOfBackslash 1: [ OK ] EmitterTest.ValueOfBackslash (0 ms) 1: [----------] 82 tests from EmitterTest (9 ms total) 1: 1: [----------] 5 tests from EmitterErrorTest 1: [ RUN ] EmitterErrorTest.BadLocalTag 1: [ OK ] EmitterErrorTest.BadLocalTag (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndSeq 1: [ OK ] EmitterErrorTest.ExtraEndSeq (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndMap 1: [ OK ] EmitterErrorTest.ExtraEndMap (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAnchor 1: [ OK ] EmitterErrorTest.InvalidAnchor (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAlias 1: [ OK ] EmitterErrorTest.InvalidAlias (0 ms) 1: [----------] 5 tests from EmitterErrorTest (0 ms total) 1: 1: [----------] 10 tests from EncodingTest 1: [ RUN ] EncodingTest.UTF8_noBOM 1/1 Test #1: yaml-test ........................***Exception: SegFault 1.33 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 1.33 sec

The following tests FAILED: 1 - yaml-test (SEGFAULT) Errors while running CTest

On Jul 25, 2019, at 2:05 PM, Jesse Beder notifications@github.com wrote:

Can you run the unit tests bundled with the library?

On Thu, Jul 25, 2019 at 4:44 PM dhaglin notifications@github.com wrote:

I built YAML-CPP on an ubuntu (18.04.02) linux using g++ (version 7.4.0) with a debug build (-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC).

Based on this code I see on the YAML-CPP tutorial page:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Weeks, LF: Ryan Braun}"); for(YAML::const_iterator it=lineup.begin();it!=lineup.end();++it) { std::cout << "Playing at " << it->first.asstd::string() << " is " << it->second.asstd::string() << "\n"; }

I tried running this code:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Week s, LF: Ryan Braun}"); std::cout << "Got the lineup parsed\n"; // YAML::const_iterator it = lineup.begin(); lineup.begin(); std::cout << "Got a begin iterator\n";

And I got this outcome:

Got the lineup parsed /usr/include/c++/7/debug/safe_iterator.h:149: Error: attempt to copy-construct an iterator from a singular iterator.

Objects involved in the operation: iterator "this" @ 0x0x7fff4c9f75a8 { type =

gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node*,

YAML::detail::node>, std::cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node>

(mutable iterator); state = singular; } iterator "other" @ 0x0x7fff4c9f74d8 { type =

gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node*,

YAML::detail::node>, std::cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node>

(mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node>

' @

0x0x7fb5954236a0 } Aborted (core dumped)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBT42WTPW2UOXMOISELQBIGBPA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBSLHWA

,

or mute the thread <

https://github.com/notifications/unsubscribe-auth/AAICUBX66WY5Y37Y44UW7FTQBIGBPANCNFSM4IG6I4ZQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AJC2RXK6CECKBTKHHAWOGN3QBIIQJA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22YWOI#issuecomment-515214137 , or mute the thread <

https://github.com/notifications/unsubscribe-auth/AJC2RXJE2TLFO4GTWQSTRF3QBIIQJANCNFSM4IG6I4ZQ

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub < https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBW3ZYE6OP65AGU5RXDQBNTBHA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25XUJI#issuecomment-515602981 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAICUBWCJW4IRQNQBEUKOMDQBNTBHANCNFSM4IG6I4ZQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBXENPX77WO4UDQI7ETQBNYS3A5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD252ILI#issuecomment-515613741, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICUBVOHMR3A4WKEFZLUGDQBNYS3ANCNFSM4IG6I4ZQ .

dhaglin commented 5 years ago

Yes, that is an accurate explanation of the situation.

Are you able to reproduce these same behaviors?

On Jul 29, 2019, at 6:20 AM, Jesse Beder notifications@github.com wrote:

I see. It sounds like there are two issues, which are maybe the same:

  1. When you run the sample code you wrote, you get the "singular iterator" exception at runtime.
  2. When you run the tests, you get a segfault in EncodingTest.UTF8_noBOM (I think?)

Both only happen when you add -D_GLIBCXX_DEBUG, and do not happen at HEAD of the repo.

Is this correct?

On Fri, Jul 26, 2019 at 6:07 PM dhaglin notifications@github.com wrote:

Yes, but that is not how we build our code.

Somewhere in your header files there is a creation of a singular iterator that is then copied somewhere else. We just couldn’t find it within a few hours of searching.

Sent from my iPhone

On Jul 26, 2019, at 2:39 PM, Jesse Beder notifications@github.com wrote:

If you don’t add anything to the CMake file, can you compile and run the tests?

On Fri, Jul 26, 2019 at 5:20 PM dhaglin notifications@github.com wrote:

Hi Jesse,

Thank you for pursuing this issue. I’d love to be able to use this package but cannot as long as this error occurs.

If I add a bit of code to the CMakeLists.txt file:

set(yaml_cxx_flags ${CMAKE_CXX_FLAGS})

if(CMAKE_BUILD_TYPE STREQUAL "debug") set(yaml_cxx_flags "-D_GLIBCXX_DEBUG" ${yaml_cxx_flags}) endif()

Then this is what I see when running ctest:

$ ctest -V UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl UpdateCTestConfiguration from :/home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/DartConfiguration.tcl Test project /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 1 Start 1: yaml-test

1: Test command: /home/ubuntu/work/yaml-cpp/yaml-cpp-master/build/test/run-tests 1: Test timeout computed to be: 9.99988e+06 1: [==========] Running 908 tests from 13 test cases. 1: [----------] Global test environment set-up. 1: [----------] 8 tests from OstreamWrapperTest 1: [ RUN ] OstreamWrapperTest.BufferNoWrite 1: [ OK ] OstreamWrapperTest.BufferNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteStr 1: [ OK ] OstreamWrapperTest.BufferWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.BufferWriteCStr 1: [ OK ] OstreamWrapperTest.BufferWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamNoWrite 1: [ OK ] OstreamWrapperTest.StreamNoWrite (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteStr 1: [ OK ] OstreamWrapperTest.StreamWriteStr (0 ms) 1: [ RUN ] OstreamWrapperTest.StreamWriteCStr 1: [ OK ] OstreamWrapperTest.StreamWriteCStr (0 ms) 1: [ RUN ] OstreamWrapperTest.Position 1: [ OK ] OstreamWrapperTest.Position (0 ms) 1: [ RUN ] OstreamWrapperTest.Comment 1: [ OK ] OstreamWrapperTest.Comment (0 ms) 1: [----------] 8 tests from OstreamWrapperTest (0 ms total) 1: 1: [----------] 12 tests from RegExTest 1: [ RUN ] RegExTest.Empty 1: [ OK ] RegExTest.Empty (0 ms) 1: [ RUN ] RegExTest.Range 1: [ OK ] RegExTest.Range (378 ms) 1: [ RUN ] RegExTest.EmptyString 1: [ OK ] RegExTest.EmptyString (0 ms) 1: [ RUN ] RegExTest.SingleCharacterString 1: [ OK ] RegExTest.SingleCharacterString (5 ms) 1: [ RUN ] RegExTest.MultiCharacterString 1: [ OK ] RegExTest.MultiCharacterString (0 ms) 1: [ RUN ] RegExTest.OperatorNot 1: [ OK ] RegExTest.OperatorNot (0 ms) 1: [ RUN ] RegExTest.OperatorOr 1: [ OK ] RegExTest.OperatorOr (800 ms) 1: [ RUN ] RegExTest.OperatorOrShortCircuits 1: [ OK ] RegExTest.OperatorOrShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorAnd 1: [ OK ] RegExTest.OperatorAnd (0 ms) 1: [ RUN ] RegExTest.OperatorAndShortCircuits 1: [ OK ] RegExTest.OperatorAndShortCircuits (0 ms) 1: [ RUN ] RegExTest.OperatorPlus 1: [ OK ] RegExTest.OperatorPlus (0 ms) 1: [ RUN ] RegExTest.StringOr 1: [ OK ] RegExTest.StringOr (0 ms) 1: [----------] 12 tests from RegExTest (1183 ms total) 1: 1: [----------] 82 tests from EmitterTest 1: [ RUN ] EmitterTest.SimpleScalar 1: [ OK ] EmitterTest.SimpleScalar (1 ms) 1: [ RUN ] EmitterTest.SimpleQuotedScalar 1: [ OK ] EmitterTest.SimpleQuotedScalar (0 ms) 1: [ RUN ] EmitterTest.SimpleSeq 1: [ OK ] EmitterTest.SimpleSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowSeq 1: [ OK ] EmitterTest.SimpleFlowSeq (0 ms) 1: [ RUN ] EmitterTest.EmptyFlowSeq 1: [ OK ] EmitterTest.EmptyFlowSeq (0 ms) 1: [ RUN ] EmitterTest.NestedBlockSeq 1: [ OK ] EmitterTest.NestedBlockSeq (0 ms) 1: [ RUN ] EmitterTest.NestedFlowSeq 1: [ OK ] EmitterTest.NestedFlowSeq (0 ms) 1: [ RUN ] EmitterTest.SimpleMap 1: [ OK ] EmitterTest.SimpleMap (0 ms) 1: [ RUN ] EmitterTest.SimpleFlowMap 1: [ OK ] EmitterTest.SimpleFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapAndList 1: [ OK ] EmitterTest.MapAndList (1 ms) 1: [ RUN ] EmitterTest.ListAndMap 1: [ OK ] EmitterTest.ListAndMap (0 ms) 1: [ RUN ] EmitterTest.NestedBlockMap 1: [ OK ] EmitterTest.NestedBlockMap (0 ms) 1: [ RUN ] EmitterTest.NestedFlowMap 1: [ OK ] EmitterTest.NestedFlowMap (0 ms) 1: [ RUN ] EmitterTest.MapListMix 1: [ OK ] EmitterTest.MapListMix (0 ms) 1: [ RUN ] EmitterTest.SimpleLongKey 1: [ OK ] EmitterTest.SimpleLongKey (0 ms) 1: [ RUN ] EmitterTest.SingleLongKey 1: [ OK ] EmitterTest.SingleLongKey (0 ms) 1: [ RUN ] EmitterTest.ComplexLongKey 1: [ OK ] EmitterTest.ComplexLongKey (0 ms) 1: [ RUN ] EmitterTest.AutoLongKey 1: [ OK ] EmitterTest.AutoLongKey (1 ms) 1: [ RUN ] EmitterTest.ScalarFormat 1: [ OK ] EmitterTest.ScalarFormat (0 ms) 1: [ RUN ] EmitterTest.AutoLongKeyScalar 1: [ OK ] EmitterTest.AutoLongKeyScalar (0 ms) 1: [ RUN ] EmitterTest.LongKeyFlowMap 1: [ OK ] EmitterTest.LongKeyFlowMap (0 ms) 1: [ RUN ] EmitterTest.BlockMapAsKey 1: [ OK ] EmitterTest.BlockMapAsKey (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchor 1: [ OK ] EmitterTest.AliasAndAnchor (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorWithNull 1: [ OK ] EmitterTest.AliasAndAnchorWithNull (0 ms) 1: [ RUN ] EmitterTest.AliasAndAnchorInFlow 1: [ OK ] EmitterTest.AliasAndAnchorInFlow (0 ms) 1: [ RUN ] EmitterTest.SimpleVerbatimTag 1: [ OK ] EmitterTest.SimpleVerbatimTag (1 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockSeq 1: [ OK ] EmitterTest.VerbatimTagInBlockSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeq 1: [ OK ] EmitterTest.VerbatimTagInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowSeqWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowSeqWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInBlockMap 1: [ OK ] EmitterTest.VerbatimTagInBlockMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMap 1: [ OK ] EmitterTest.VerbatimTagInFlowMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagInFlowMapWithNull 1: [ OK ] EmitterTest.VerbatimTagInFlowMapWithNull (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeq 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeq (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptyMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptyMap (0 ms) 1: [ RUN ] EmitterTest.VerbatimTagWithEmptySeqAndMap 1: [ OK ] EmitterTest.VerbatimTagWithEmptySeqAndMap (0 ms) 1: [ RUN ] EmitterTest.ByKindTagWithScalar 1: [ OK ] EmitterTest.ByKindTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.LocalTagWithScalar 1: [ OK ] EmitterTest.LocalTagWithScalar (0 ms) 1: [ RUN ] EmitterTest.ComplexDoc 1: [ OK ] EmitterTest.ComplexDoc (1 ms) 1: [ RUN ] EmitterTest.STLContainers 1: [ OK ] EmitterTest.STLContainers (0 ms) 1: [ RUN ] EmitterTest.SimpleComment 1: [ OK ] EmitterTest.SimpleComment (0 ms) 1: [ RUN ] EmitterTest.MultiLineComment 1: [ OK ] EmitterTest.MultiLineComment (0 ms) 1: [ RUN ] EmitterTest.ComplexComments 1: [ OK ] EmitterTest.ComplexComments (0 ms) 1: [ RUN ] EmitterTest.InitialComment 1: [ OK ] EmitterTest.InitialComment (1 ms) 1: [ RUN ] EmitterTest.InitialCommentWithDocIndicator 1: [ OK ] EmitterTest.InitialCommentWithDocIndicator (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowSeq 1: [ OK ] EmitterTest.CommentInFlowSeq (0 ms) 1: [ RUN ] EmitterTest.CommentInFlowMap 1: [ OK ] EmitterTest.CommentInFlowMap (0 ms) 1: [ RUN ] EmitterTest.Indentation 1: [ OK ] EmitterTest.Indentation (0 ms) 1: [ RUN ] EmitterTest.SimpleGlobalSettings 1: [ OK ] EmitterTest.SimpleGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.ComplexGlobalSettings 1: [ OK ] EmitterTest.ComplexGlobalSettings (0 ms) 1: [ RUN ] EmitterTest.Null 1: [ OK ] EmitterTest.Null (0 ms) 1: [ RUN ] EmitterTest.EscapedUnicode 1: [ OK ] EmitterTest.EscapedUnicode (0 ms) 1: [ RUN ] EmitterTest.Unicode 1: [ OK ] EmitterTest.Unicode (0 ms) 1: [ RUN ] EmitterTest.DoubleQuotedUnicode 1: [ OK ] EmitterTest.DoubleQuotedUnicode (0 ms) 1: [ RUN ] EmitterTest.UserType 1: [ OK ] EmitterTest.UserType (1 ms) 1: [ RUN ] EmitterTest.UserTypeInContainer 1: [ OK ] EmitterTest.UserTypeInContainer (0 ms) 1: [ RUN ] EmitterTest.PointerToInt 1: [ OK ] EmitterTest.PointerToInt (0 ms) 1: [ RUN ] EmitterTest.PointerToUserType 1: [ OK ] EmitterTest.PointerToUserType (0 ms) 1: [ RUN ] EmitterTest.NewlineAtEnd 1: [ OK ] EmitterTest.NewlineAtEnd (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockSequence 1: [ OK ] EmitterTest.NewlineInBlockSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowSequence 1: [ OK ] EmitterTest.NewlineInFlowSequence (0 ms) 1: [ RUN ] EmitterTest.NewlineInBlockMap 1: [ OK ] EmitterTest.NewlineInBlockMap (0 ms) 1: [ RUN ] EmitterTest.NewlineInFlowMap 1: [ OK ] EmitterTest.NewlineInFlowMap (0 ms) 1: [ RUN ] EmitterTest.LotsOfNewlines 1: [ OK ] EmitterTest.LotsOfNewlines (0 ms) 1: [ RUN ] EmitterTest.Binary 1: [ OK ] EmitterTest.Binary (0 ms) 1: [ RUN ] EmitterTest.LongBinary 1: [ OK ] EmitterTest.LongBinary (1 ms) 1: [ RUN ] EmitterTest.EmptyBinary 1: [ OK ] EmitterTest.EmptyBinary (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalar 1: [ OK ] EmitterTest.ColonAtEndOfScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAsScalar 1: [ OK ] EmitterTest.ColonAsScalar (0 ms) 1: [ RUN ] EmitterTest.ColonAtEndOfScalarInFlow 1: [ OK ] EmitterTest.ColonAtEndOfScalarInFlow (0 ms) 1: [ RUN ] EmitterTest.BoolFormatting 1: [ OK ] EmitterTest.BoolFormatting (0 ms) 1: [ RUN ] EmitterTest.ImplicitDocStart 1: [ OK ] EmitterTest.ImplicitDocStart (0 ms) 1: [ RUN ] EmitterTest.EmptyString 1: [ OK ] EmitterTest.EmptyString (0 ms) 1: [ RUN ] EmitterTest.SingleChar 1: [ OK ] EmitterTest.SingleChar (0 ms) 1: [ RUN ] EmitterTest.DefaultPrecision 1: [ OK ] EmitterTest.DefaultPrecision (0 ms) 1: [ RUN ] EmitterTest.SetPrecision 1: [ OK ] EmitterTest.SetPrecision (0 ms) 1: [ RUN ] EmitterTest.DashInBlockContext 1: [ OK ] EmitterTest.DashInBlockContext (0 ms) 1: [ RUN ] EmitterTest.HexAndOct 1: [ OK ] EmitterTest.HexAndOct (0 ms) 1: [ RUN ] EmitterTest.CompactMapWithNewline 1: [ OK ] EmitterTest.CompactMapWithNewline (1 ms) 1: [ RUN ] EmitterTest.ForceSingleQuotedToDouble 1: [ OK ] EmitterTest.ForceSingleQuotedToDouble (0 ms) 1: [ RUN ] EmitterTest.QuoteNull 1: [ OK ] EmitterTest.QuoteNull (0 ms) 1: [ RUN ] EmitterTest.ValueOfDoubleQuote 1: [ OK ] EmitterTest.ValueOfDoubleQuote (0 ms) 1: [ RUN ] EmitterTest.ValueOfBackslash 1: [ OK ] EmitterTest.ValueOfBackslash (0 ms) 1: [----------] 82 tests from EmitterTest (9 ms total) 1: 1: [----------] 5 tests from EmitterErrorTest 1: [ RUN ] EmitterErrorTest.BadLocalTag 1: [ OK ] EmitterErrorTest.BadLocalTag (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndSeq 1: [ OK ] EmitterErrorTest.ExtraEndSeq (0 ms) 1: [ RUN ] EmitterErrorTest.ExtraEndMap 1: [ OK ] EmitterErrorTest.ExtraEndMap (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAnchor 1: [ OK ] EmitterErrorTest.InvalidAnchor (0 ms) 1: [ RUN ] EmitterErrorTest.InvalidAlias 1: [ OK ] EmitterErrorTest.InvalidAlias (0 ms) 1: [----------] 5 tests from EmitterErrorTest (0 ms total) 1: 1: [----------] 10 tests from EncodingTest 1: [ RUN ] EncodingTest.UTF8_noBOM 1/1 Test #1: yaml-test ........................***Exception: SegFault 1.33 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 1.33 sec

The following tests FAILED: 1 - yaml-test (SEGFAULT) Errors while running CTest

On Jul 25, 2019, at 2:05 PM, Jesse Beder notifications@github.com wrote:

Can you run the unit tests bundled with the library?

On Thu, Jul 25, 2019 at 4:44 PM dhaglin notifications@github.com wrote:

I built YAML-CPP on an ubuntu (18.04.02) linux using g++ (version 7.4.0) with a debug build (-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC).

Based on this code I see on the YAML-CPP tutorial page:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Weeks, LF: Ryan Braun}"); for(YAML::const_iterator it=lineup.begin();it!=lineup.end();++it) { std::cout << "Playing at " << it->first.asstd::string() << " is " << it->second.asstd::string() << "\n"; }

I tried running this code:

YAML::Node lineup = YAML::Load("{1B: Prince Fielder, 2B: Rickie Week s, LF: Ryan Braun}"); std::cout << "Got the lineup parsed\n"; // YAML::const_iterator it = lineup.begin(); lineup.begin(); std::cout << "Got a begin iterator\n";

And I got this outcome:

Got the lineup parsed /usr/include/c++/7/debug/safe_iterator.h:149: Error: attempt to copy-construct an iterator from a singular iterator.

Objects involved in the operation: iterator "this" @ 0x0x7fff4c9f75a8 { type =

gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node*,

YAML::detail::node>, std::cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node>

(mutable iterator); state = singular; } iterator "other" @ 0x0x7fff4c9f74d8 { type =

gnu_debug::_Safe_iterator<__gnu_cxx::normal_iterator<std::pair<YAML::detail::node*,

YAML::detail::node>, std::cxx1998::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node> > > >, std::debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node>

(mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::pair<YAML::detail::node, YAML::detail::node>, std::allocator<std::pair<YAML::detail::node, YAML::detail::node>

' @

0x0x7fb5954236a0 } Aborted (core dumped)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBT42WTPW2UOXMOISELQBIGBPA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBSLHWA

,

or mute the thread <

https://github.com/notifications/unsubscribe-auth/AAICUBX66WY5Y37Y44UW7FTQBIGBPANCNFSM4IG6I4ZQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AJC2RXK6CECKBTKHHAWOGN3QBIIQJA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22YWOI#issuecomment-515214137 , or mute the thread <

https://github.com/notifications/unsubscribe-auth/AJC2RXJE2TLFO4GTWQSTRF3QBIIQJANCNFSM4IG6I4ZQ

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub < https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBW3ZYE6OP65AGU5RXDQBNTBHA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25XUJI#issuecomment-515602981 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAICUBWCJW4IRQNQBEUKOMDQBNTBHANCNFSM4IG6I4ZQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AAICUBXENPX77WO4UDQI7ETQBNYS3A5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD252ILI#issuecomment-515613741, or mute the thread https://github.com/notifications/unsubscribe-auth/AAICUBVOHMR3A4WKEFZLUGDQBNYS3ANCNFSM4IG6I4ZQ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jbeder/yaml-cpp/issues/716?email_source=notifications&email_token=AJC2RXMY3F4EJP63Q7XNTWTQB3VARA5CNFSM4IG6I4Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3AVUVA#issuecomment-515988052, or mute the thread https://github.com/notifications/unsubscribe-auth/AJC2RXOIWGNJLI5YSKYQ54DQB3VARANCNFSM4IG6I4ZQ.