iceoryx icon indicating copy to clipboard operation
iceoryx copied to clipboard

The signal handler in examples may have undefined behavior

Open elfenpiff opened this issue 2 years ago • 1 comments

Required information

Some examples register a separate signal handler callback and operate on global objects in it. This can easily lead to undefined behavior. A signal can lead to a jump directly into the signal handler function from the middle of another function/method callback and then jump back to that call. When then the signal handler operates on such an object it is possible that the object is in an undefined state since an ongoing operation was interrupted.

We have to refactor those examples so that no global object is accessed which can be currently in use when the signal arises.

elfenpiff avatar Mar 04 '22 11:03 elfenpiff

FYI: @elBoberido @FerdinandSpitzschnueffler did I forget anything?

elfenpiff avatar Mar 04 '22 11:03 elfenpiff