Thanks to visit codestin.com
Credit goes to github.com

Skip to content

If backward_ros is present, use it to avoid duplicate symbols #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

v-lopez
Copy link
Contributor

@v-lopez v-lopez commented Feb 14, 2019

If BT is linked against a package that also uses backward, it will segfault with:

==10381== Invalid free() / delete / delete[] / realloc()
==10381==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10381==    by 0x853B369: __cxa_finalize (cxa_finalize.c:56)
==10381==    by 0x5DE6312: ??? (in /home/victor/other_ws/grasping_pipeline_minimal/devel/.private/behaviortree_cpp/lib/libbehaviortree_cpp.so)
==10381==    by 0x4010DE6: _dl_fini (dl-fini.c:235)
==10381==    by 0x853AFF7: __run_exit_handlers (exit.c:82)
==10381==    by 0x853B044: exit (exit.c:104)
==10381==    by 0x8521836: (below main) (libc-start.c:325)
==10381==  Address 0x22c50040 is 0 bytes inside a block of size 8,388,608 free'd
==10381==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10381==    by 0x853B369: __cxa_finalize (cxa_finalize.c:56)
==10381==    by 0x4E3E982: ??? (in /opt/pal/erbium/lib/libbackward.so)
==10381==    by 0x4010DE6: _dl_fini (dl-fini.c:235)
==10381==    by 0x853AFF7: __run_exit_handlers (exit.c:82)
==10381==    by 0x853B044: exit (exit.c:104)
==10381==    by 0x8521836: (below main) (libc-start.c:325)
==10381==  Block was alloc'd at
==10381==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10381==    by 0x4E3F854: backward::SignalHandling::SignalHandling(std::vector<int, std::allocator<int> > const&) (in /opt/pal/erbium/lib/libbackward.so)
==10381==    by 0x4E3E884: ??? (in /opt/pal/erbium/lib/libbackward.so)
==10381==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==10381==    by 0x40107CA: call_init (dl-init.c:30)
==10381==    by 0x40107CA: _dl_init (dl-init.c:120)
==10381==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==10381==    by 0x5: ???
==10381==    by 0xFFEFFEF4A: ???
==10381==    by 0xFFEFFEFB0: ???
==10381==    by 0xFFEFFF022: ???
==10381==    by 0xFFEFFF029: ???
==10381==    by 0xFFEFFF04C: ???
==10381== 

In ROS we have backward_ros, which can be reused among several packages and avoids this issue.
I don't know if you want to tackle this in a different way, but for backward_ros interactions this is sufficient.

@facontidavide
Copy link
Collaborator

thanks

@facontidavide facontidavide merged commit 0dd9ac2 into BehaviorTree:ver_3 Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants