libxlio
libxlio copied to clipboard
issue: 4039462 XLIO crashes on thread_local stats
Description
Fixing XLIO crash with thread_local stats object
What
The thread_local objects are deallocated once the thread is finished. Depending on the configuration sockets can use a pointer to a thread_local stats object. If that thread is finished but the socket is still alive, XLIO will try to access deallocated stats object and hit seg fault.
Why ?
Crash fix
How ?
To make things straight forward we always ask if stats object exists. This should also be the most efficient. No more thread_local or global dummy object.
Change type
What kind of change does this PR introduce?
- [X] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Tests
- [ ] Other
Check list
- [ ] Code follows the style de facto guidelines of this project
- [ ] Comments have been inserted in hard to understand places
- [ ] Documentation has been updated (if necessary)
- [ ] Test has been added (if possible)