-
Notifications
You must be signed in to change notification settings - Fork 163
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 rcl_parse_yaml_file() error handling. #776
Conversation
It should not fini its output argument, silently invalidating the given pointer. Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please clarify the contract of this method in the header file? It's not clear to me whether this is what is expected by downstream consumers.
Sure, we can add one. Considering that |
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@clalancette does 1ebb39a make sense? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for the additional clarification here.
/// \brief Parse the YAML file, initialize and populate params_st | ||
/// \brief Parse the YAML file and populate \p params_st | ||
/// \pre Given \p params_st must be a valid parameter struct | ||
/// as retured by `rcl_yaml_node_struct_init()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// as retured by `rcl_yaml_node_struct_init()` | |
/// as returned by `rcl_yaml_node_struct_init()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh... 🤦 See be78d0d. Wonder why my spell checker didn't catch it.
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Alright, all green. Going in! |
Sorry I missed this, but this PR didn't adjust the unit tests to fix mem leaks. See #779 |
Will this need a backport? It changes API slightly. Backporting after I backport #754 will become much more difficult. However, not backporting this PR will cause a divergence that might introduce memory errors or leaks. |
It should not fini its output argument, silently invalidating the given pointer. Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
It should not
fini
its output argument, silently invalidating the given pointer.CI up to
rcl_yaml_param_parser
andrcl
: