Skip to content

Fixing segfault with reading from BuiltinTopicDcpsTopic#130

Merged
thijsmie merged 5 commits intoeclipse-cyclonedds:masterfrom
willstott101:bug/builtin_dcps_topic
Aug 19, 2022
Merged

Fixing segfault with reading from BuiltinTopicDcpsTopic#130
thijsmie merged 5 commits intoeclipse-cyclonedds:masterfrom
willstott101:bug/builtin_dcps_topic

Conversation

@willstott101
Copy link
Copy Markdown
Contributor

Mainly opening the MR to check if it reproduces on the CI - I consistently get segfault when using this builtin topic - which I wanted to use for type introspection of known topic names.

@willstott101
Copy link
Copy Markdown
Contributor Author

willstott101 commented Aug 18, 2022

The dds_builtintopic_endpoint array rcontainer in ddspy_read_endpoint in pysertype.c appears to have invalid entries. Valgrind is reporting invalid reads when rcontainer[i]->qos is accessed... even when checking if the qos is NULL.

I'm a little confused here, and would need to learn a lot to dig further. So I'm going to leave this and avoid the introspection for a while, hopefully will find a chance to come back to this.

@willstott101
Copy link
Copy Markdown
Contributor Author

Ahah! In the cyclonedds C tests the Topic endpoint is of type dds_builtintopic_topic_t not dds_builtintopic_endpoint_t: https://github.com/eclipse-cyclonedds/cyclonedds/blob/master/src/core/ddsc/tests/topic_discovery.c#L139

So I think we need ANOTHER read/take pair for the topics in pysertype.c

@willstott101 willstott101 changed the title WIP: Reproducing segfault with reading from BuiltinTopicDcpsTopic Fixing segfault with reading from BuiltinTopicDcpsTopic Aug 18, 2022
@thijsmie
Copy link
Copy Markdown
Contributor

Thanks for your work on this @willstott101! 🥳

@thijsmie thijsmie merged commit 30ddbb0 into eclipse-cyclonedds:master Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants