Skip to content
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

Fix crash when error scanning ethercat slaves #56

Open
toliver opened this issue Oct 26, 2016 · 0 comments
Open

Fix crash when error scanning ethercat slaves #56

toliver opened this issue Oct 26, 2016 · 0 comments

Comments

@toliver
Copy link
Collaborator

toliver commented Oct 26, 2016

If the function exits here:

https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L116

then m_slave_handler pointed object is not instantiated here:

https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L121

And generates a segfault with malloc.c: No such file or directory when the destructor tries to delete it here:

https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L72

Probably we should check if (m_slave_handler) before deleting?

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

No branches or pull requests

1 participant