POETSII / Orchestrator

The Orchestrator is the configuration and run-time management system for POETS platforms.
1 stars 1 forks source link

Segfault at task /load if an otherwise-valid XML file has an edge with an invalid device or pin name #115

Closed AlexRast closed 4 years ago

AlexRast commented 4 years ago

Say you have an xml file with device types Tom and Dick, Tom has pin types Up and Down whilst Dick has pin types Left and Right.

Now let's say you define an edge instance like this:

<EdgeI path="Harry:Right-Tom:Up"/>

or

<EdgeI path="Tom:Left:Dick:Right"/>

or

<EdgeI path="Tom:Top-Dick:Right"/>

the parser will crash when it gets to trying to elaborate the edge because it will try to find a nonexistent device type or pin type.

The problem has been identified - it is in pedgeinstance.cpp where the values are not being tested before being dereferenced. A fix is in work.

AlexRast commented 4 years ago

A pull request has been created for this issue, which should now be fixed.

AlexRast commented 4 years ago

Further investigation found a related bug in the Supervisor: if a Supervisor receives a message from a pin it doesn't have defined, it will also segfault. This has also been fixed and pushed into the bugfix115 branch so a merge will kill both bugs.

AlexRast commented 4 years ago

Closing this issue - bugfix115 has been merged