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 segfault for internally disconnected output ports #1195

Merged
merged 4 commits into from
May 27, 2022

Conversation

Soroosh129
Copy link
Contributor

This fixes a segmentation fault that arose whenever a federate had an output port that was not internally connected (e.g., it did not appear as an effect in any reaction). In the CGenerator, such an output port will be NULL, but the output control reactions were attempting to check the ->is_present field of these ports.

This PR adds an extra check for this.

Copy link
Collaborator

@edwardalee edwardalee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Slight simplification suggested.

@Soroosh129 Soroosh129 merged commit 03a9e3d into master May 27, 2022
@Soroosh129 Soroosh129 deleted the federated-segfault-fix branch May 27, 2022 19:47
@petervdonovan petervdonovan added bug Something isn't working federated labels May 28, 2022
@lhstrh lhstrh changed the title [Federated] Fix segfault for internally disconnected output ports Fix segfault for internally disconnected output ports May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working federated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants