Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: missing return statement in custom ostream operator<< added
When using clang, writing to output stream caused segmentation violation because the stream object was not returned by the operator which has been used just before. Adding also some other return statements (though irrelevant for the crash). Crash log * thread #1: tid = 0x597d9, 0x0000000100001f7f testMessageList`void print_list<AliceO2::Format::messageList<TestMsg, SimpleHeader_t> >(list=<unavailable>, hdrsel=<unavailable>) + 191 at testMessageList.cxx:77, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000100001f7f testMessageList`void print_list<AliceO2::Format::messageList<TestMsg, SimpleHeader_t> >(list=<unavailable>, hdrsel=<unavailable>) + 191 at testMessageList.cxx:77 74 it != list.end(); 75 ++it) { 76 // the iterator defines a conversion operator to the header type -> 77 std::cout << static_cast<typename ListType::header_type>(it) << std::end; 78 // dereferencing of the iterator gives the payload 79 std::cout << *it << std::end; 80 }
- Loading branch information