eclipse-iceoryx / eclipse-iceoryx/iceoryx

The signal handler in examples may have undefined behavior

Open
#1,237 1 comment 0 reactions 0 assignees View on GitHub
refactoring
Dominant language
C++
Stars
2.2k
Forks
492
Avg merge
18h 57m
Merged PRs (30d)
1

Description

## 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.