Bug #4585
Updated by Davide Pesavento over 6 years ago
The newest version of ndn-cxx produces a bus error or a segfault when the producer example is executed. Here is the output when I ran the example through gdb and got a bus error: ``` (gdb) `(gdb) run Starting program: /home/pi/ndn-cxx/examples/a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". Breakpoint 1, main (argc=1, argv=0x7efff304) at producer.cpp:101 101 ndn::examples::Producer producer; (gdb) next 103 producer.run(); (gdb) next [New Thread 0x7445b450 (LWP 11204)] << I: /example/testApp/randomData?ndn.MustBeFresh=1&ndn.InterestLifetime=1500&ndn.Nonce=1194608572 >> D: Name: /example/testApp/randomData/testApp/%FD%00%00%01b%BB%983%05 MetaInfo: ContentType: 0, FreshnessPeriod: 1500 milliseconds Content: (size: 11) Signature: (type: SignatureSha256WithRsa, value_length: 256) Thread 1 "a.out" received signal SIGBUS, Bus error. 0x00012b24 in __gnu_cxx::__atomic_add (__mem=0x4f921, __val=1) at /usr/include/c++/6/ext/atomicity.h:53 53 { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); } ``` (gdb) ` And here is the output for the segmentation fault: ``` (gdb) `(gdb) run Starting program: /home/travis/ndn-cxx/examples/a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, main (argc=1, argv=0x7fffffffded8) at producer.cpp:100 100 { (gdb) next 101 ndn::examples::Producer producer; (gdb) next 103 producer.run(); (gdb) next [New Thread 0x7ffff2f0d700 (LWP 4133)] Thread 1 "a.out" received signal SIGSEGV, Segmentation fault. 0x00007ffff78feb05 in std::__shared_ptr<ndn::Buffer const, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<ndn::Buffer const, (__gnu_cxx::_Lock_policy)2>&&) (__r=<optimized out>, this=<optimized out>) at /usr/include/c++/5/bits/shared_ptr_base.h:936 936 __r._M_ptr = 0; ``` (gdb) `