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

Invalid write in threads::ThreadDelegate::~ThreadDelegate() #3387

Closed
iCollin opened this issue May 20, 2020 · 1 comment
Closed

Invalid write in threads::ThreadDelegate::~ThreadDelegate() #3387

iCollin opened this issue May 20, 2020 · 1 comment

Comments

@iCollin
Copy link
Collaborator

iCollin commented May 20, 2020

Bug Report

A memory error occurs when a thread is destroyed before its delegate. The delegate will still hold a pointer to the thread and will try to write on that pointer at destruction.

Reproduction Steps
  1. Start core with valgrind:
    LD_LIBRARY_PATH=. valgrind --trace-children=yes --leak-check=full ./smartDeviceLinkCore > valgrind.log 2>&1
  2. Start SDL HMI
  3. Wait patiently for the HMI to connect
  4. Send Exit Application -> IGNITION_OFF
Expected Behavior

The valgrind log shows no memory errors

Observed Behavior

The valgrind log shows a similar memory error many times:

==92645== Invalid write of size 8
==92645==    at 0x719118: threads::Thread::set_delegate(threads::ThreadDelegate*) (thread.h:128)
==92645==    by 0x718C69: threads::ThreadDelegate::~ThreadDelegate() (thread_delegate.cc:44)
OS & Version Information
  • OS/Version: Ubuntu 18.04.2
  • SDL Core Version: develop
  • Testing Against: sdl_hmi
@iCollin
Copy link
Collaborator Author

iCollin commented May 28, 2020

Closed via #3388

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