Skip to content

Conversation

@bpapaspyros
Copy link

Description

The original intention for this branch/PR was to investigate seg faults that would occur when running apps. Along with some issues in the way I was packaging (unrelated to this PR, but related to the seg faults I was seeing), we found a small issue in the way a failed dynamic_pointer_cast would be handled (i.e., it doesn't throw an exception, but returns nullptr).

There also seems to be some sort of issue where we get an EncodedState exception that is followed by a segmentation fault. I can't quite see a reason. We moved the second dereference of the message from readFromNonRT to potentially prevent this issue (in the case of some sync problem between first and second dereference). Despite this not being very likely, and also not being fully safe, it doesn't hurt to do this in one line.

  • n/a

This PR solves the issue by correctly handling a failed dynamic_pointer_cast.

Review guidelines

Estimated Time of Review: 3 minutes

Checklist before merging:

  • Confirm that the relevant changelog(s) are up-to-date in case of any user-facing changes

@bpapaspyros bpapaspyros requested review from domire8 and eeberhard June 13, 2024 08:03
@bpapaspyros bpapaspyros self-assigned this Jun 13, 2024
@github-actions
Copy link

github-actions bot commented Jun 13, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@bpapaspyros
Copy link
Author

I have read and understood the Contributor License Agreement and hereby sign it

@bpapaspyros
Copy link
Author

recheck

github-actions bot added a commit that referenced this pull request Jun 13, 2024
eeberhard
eeberhard previously approved these changes Jun 13, 2024
domire8
domire8 previously approved these changes Jun 14, 2024
Copy link
Member

@domire8 domire8 left a comment

Choose a reason for hiding this comment

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

Very nice, let's test with a corresponding branch on modulo controllers, then we release it

@bpapaspyros bpapaspyros dismissed stale reviews from domire8 and eeberhard via 6ec40d8 June 14, 2024 07:14
@domire8 domire8 changed the title fix(modulo_controllers): correctly handle nullptr fix(modulo-controllers): correctly handle nullptr Jun 14, 2024
@bpapaspyros bpapaspyros merged commit 5101730 into main Jun 14, 2024
@bpapaspyros bpapaspyros deleted the fix/unhandled_nullptr branch June 14, 2024 08:04
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants