Closed
Description
Building my own tests - inspired by yours - I came across a case that crashes the library.
I think adding a unit test with DBC content below should reproduce the issue on your side.
Notice the frame id on a new line after BO_
VERSION "1.0.0"
NS_ :
BS_:
BU_: DBG DRIVER IO MOTOR SENSOR
BO_
234 MSG1: 8 Vector__XXX
SG_ State1 : 0|8@1+ (1,0) [0|200] "Km/h" DEVICE1,DEVICE2,DEVICE3
SG_ State2 : 0|8@1+ (1,0) [0|204] "" DEVICE1,DEVICE2,DEVICE3
VAL_ 234 State1 123 "Description 1" 0 "Description 2" 90903489 "Big value and special characters &$§())!" ;
For completness, here is the relevant callstack:
Program received signal SIGSEGV, Segmentation fault.
0x00005555556b1fc0 in std::vector<libdbc::Signal, std::allocator<libdbc::Signal> >::push_back(libdbc::Signal const&) ()
(gdb) where
#0 0x00005555556b1fc0 in std::vector<libdbc::Signal, std::allocator<libdbc::Signal> >::push_back(libdbc::Signal const&) ()
#1 0x00005555556b1c29 in libdbc::Message::appendSignal(libdbc::Signal const&) ()
#2 0x00005555556844cb in libdbc::DbcParser::parse_dbc_messages(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) ()
#3 0x00005555556836b6 in libdbc::DbcParser::parse_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
Metadata
Metadata
Assignees
Labels
No labels