Hi!
Update: Solved: See Issue for catkin https://github.com/ros/catkin/issues/963
I started fiddle around with gmock on kinetic, I managed to get it working, however at the end of the test of my machine I get a double free() corruption. So I setup a minimal example to make sure it is nothing implementation specific. Then I switched to another machine running melodic. Supprise! On melodic everything works just fine.
Does anyone have some more insights? It sounds a bit like https://github.com/google/googletest/issues/930
This (https://github.com/alex-gee/testhelper is the code containing my test.
Also would help me if someone could check it on his/her kinetic machine.
I am not sure If there is something wrong with my setup.
Thanks in advance!!!
The Error I get when running catkin_make run_tests_testhelper
is
[==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from TestSuite [ RUN ] TestSuite.testCase2 [ OK ] TestSuite.testCase2 (0 ms) [----------] 1 test from TestSuite (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (0 ms total) [ PASSED ] 1 test. *** Error in `/home/alex/catkin_ws/devel/lib/testhelper/unittest_simple': double free or corruption (out): 0x0000000001119670 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f8ac1b807e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f8ac1b8937a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f8ac1b8d53c] /home/alex/catkin_ws/build/gtest/gtest/libgtest.so(_ZSt8_DestroyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvPT_+0x18)[0x7f8ac29dacc5] /home/alex/catkin_ws/build/gtest/gtest/libgtest.so(_ZNSt12_Destroy_auxILb0EE9__destroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvT_S9_+0x2e)[0x7f8ac29d965e] /home/alex/catkin_ws/build/gtest/gtest/libgtest.so(_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvT_S7_+0x23)[0x7f8ac29d655e] /home/alex/catkin_ws/build/gtest/gtest/libgtest.so(_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E+0x27)[0x7f8ac29d1cdd] /home/alex/catkin_ws/build/gtest/gtest/libgtest.so(_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev+0x36)[0x7f8ac29cc346] /lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0x9a)[0x7f8ac1b4336a] /home/alex/catkin_ws/build/gtest/libgmock.so(+0x6b353)[0x7f8ac26f3353] ======= Memory map: ======== 00400000-00420000 r-xp 00000000 08:02 663701 /home/alex/catkin_ws/devel/lib/testhelper/unittest_simple 0061f000-00620000 r--p 0001f000 08:02 663701 /home/alex/catkin_ws/devel/lib/testhelper/unittest_simple 00620000-00621000 rw-p 00020000 08:02 663701 /home/alex/catkin_ws/devel/lib/testhelper/unittest_simple 01107000-01139000 rw-p 00000000 00:00 0 [heap] 7f8abc000000-7f8abc021000 rw-p 00000000 00:00 0 7f8abc021000-7f8ac0000000 ---p 00000000 00:00 0 7f8ac1800000-7f8ac1908000 r-xp 00000000 08:02 5638894 /lib/x86_64-linux-gnu/libm-2.23.so 7f8ac1908000-7f8ac1b07000 ---p 00108000 08:02 5638894 /lib/x86_64-linux-gnu/libm-2.23.so 7f8ac1b07000-7f8ac1b08000 r--p 00107000 08:02 5638894 /lib/x86_64-linux-gnu/libm-2.23.so 7f8ac1b08000-7f8ac1b09000 rw-p 00108000 08:02 5638894 /lib/x86_64-linux-gnu/libm-2.23.so 7f8ac1b09000-7f8ac1cc9000 r-xp 00000000 08:02 5638910 /lib/x86_64-linux-gnu/libc-2.23.so 7f8ac1cc9000-7f8ac1ec9000 ---p 001c0000 08:02 5638910 /lib/x86_64-linux-gnu/libc-2.23.so 7f8ac1ec9000-7f8ac1ecd000 r--p 001c0000 08:02 5638910 /lib/x86_64-linux-gnu/libc-2.23.so 7f8ac1ecd000-7f8ac1ecf000 rw-p 001c4000 08:02 5638910 /lib/x86_64-linux-gnu/libc-2.23.so 7f8ac1ecf000-7f8ac1ed3000 rw-p 00000000 00:00 0 7f8ac1ed3000-7f8ac1ee9000 r-xp 00000000 08:02 5640723 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f8ac1ee9000-7f8ac20e8000 ---p 00016000 08:02 5640723 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f8ac20e8000-7f8ac20e9000 rw-p 00015000 08:02 5640723 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f8ac20e9000-7f8ac225b000 r-xp 00000000 08:02 4326985 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f8ac225b000-7f8ac245b000 ---p 00172000 08:02 4326985 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f8ac245b000-7f8ac2465000 r--p 00172000 08:02 4326985 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f8ac2465000-7f8ac2467000 rw-p 0017c000 08:02 4326985 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f8ac2467000-7f8ac246b000 rw-p 00000000 00:00 0 7f8ac246b000-7f8ac2483000 r-xp 00000000 08:02 5638906 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f8ac2483000-7f8ac2682000 ---p 00018000 08:02 5638906 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f8ac2682000-7f8ac2683000 r--p 00017000 08:02 5638906 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f8ac2683000-7f8ac2684000 rw-p 00018000 08:02 5638906 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f8ac2684000-7f8ac2688000 rw-p 00000000 00:00 0 7f8ac2688000-7f8ac275b000 r-xp 00000000 08:02 663690 /home/alex/catkin_ws/build/gtest/libgmock.so 7f8ac275b000-7f8ac295a000 ---p 000d3000 08:02 663690 /home/alex/catkin_ws/build/gtest/libgmock.so 7f8ac295a000-7f8ac295c000 r--p 000d2000 08:02 663690 /home/alex/catkin_ws/build/gtest/libgmock.so 7f8ac295c000-7f8ac2961000 rw-p 000d4000 08:02 663690 /home/alex/catkin_ws/build/gtest/libgmock.so 7f8ac2961000-7f8ac29f7000 r-xp 00000000 08:02 663692 /home/alex/catkin_ws/build/gtest/gtest/libgtest.so 7f8ac29f7000-7f8ac2bf7000 ---p 00096000 08:02 663692 /home/alex/catkin_ws/build/gtest/gtest/libgtest.so 7f8ac2bf7000-7f8ac2bf8000 r--p 00096000 08:02 663692 /home/alex/catkin_ws/build/gtest/gtest/libgtest.so 7f8ac2bf8000-7f8ac2bfc000 rw-p 00097000 08:02 663692 /home/alex/catkin_ws/build/gtest/gtest/libgtest.so 7f8ac2bfc000-7f8ac2c22000 r-xp 00000000 08:02 5638902 /lib/x86_64-linux-gnu/ld-2.23.so 7f8ac2dd3000-7f8ac2dd9000 rw-p 00000000 00:00 0 7f8ac2e1f000-7f8ac2e21000 rw-p 00000000 00:00 0 7f8ac2e21000-7f8ac2e22000 r--p 00025000 08:02 5638902 /lib/x86_64-linux-gnu/ld-2.23.so 7f8ac2e22000-7f8ac2e23000 rw-p 00026000 08:02 5638902 /lib/x86_64-linux-gnu/ld-2.23.so 7f8ac2e23000-7f8ac2e24000 rw-p 00000000 00:00 0 7ffc9e990000-7ffc9e9b2000 rw-p 00000000 00:00 0 [stack] 7ffc9e9f4000-7ffc9e9f7000 r--p 00000000 00:00 0 [vvar] 7ffc9e9f7000-7ffc9e9f9000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Originally posted by agutenkunst on ROS Answers with karma: 90 on 2018-10-06
Post score: 0
Original comments
Comment by gvdhoorn on 2018-10-08:
If this was resolved, then please post how you solved it as an answer below and accept your own answer.
That gives much more visibility to the fact that you solved it.