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

Memory leak in idl_create_annotation_appl #950

Closed
reicheratwork opened this issue Sep 17, 2021 · 1 comment
Closed

Memory leak in idl_create_annotation_appl #950

reicheratwork opened this issue Sep 17, 2021 · 1 comment

Comments

@reicheratwork
Copy link
Contributor

Memory assigned during the call to idl_create_annotation_appl is not collected properly in the case when the parameter is a scoped name and idl_resolve cannot resolve it correctly.

Example code to reproduce issue:

idl_pstate_t *pstate = NULL;
idl_retcode_t ret = parse_string(IDL_FLAG_ANNOTATIONS, "@value(e_0) enum e { e_0, e_1 };", &pstate);

if (pstate)
  idl_delete_pstate(pstate);
@reicheratwork
Copy link
Contributor Author

Until this issue is fixed, the last subtest in the test case annotation.c: idl_annotation::idl_default added in #919 is commented out as it triggers this issue.

When this bug is fixed, the test is to be uncommented.

k0ekk0ek added a commit to k0ekk0ek/cyclonedds that referenced this issue Sep 24, 2021
Destructors are not executed for untyped midrule actions because Bison
does not know which destructor to run. annotation_appl nodes were not
cleaned up if the annotation_appl could not be successfully finalized.

Fixes eclipse-cyclonedds#950.

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
k0ekk0ek added a commit to k0ekk0ek/cyclonedds that referenced this issue Sep 24, 2021
Destructors are not executed for untyped midrule actions because Bison
does not know which destructor to run. annotation_appl nodes were not
cleaned up if the annotation_appl could not be successfully finalized.
Remove use of midrule actions in annotation_appl as some platforms still
ship with Bison 3.0.4.

Fixes eclipse-cyclonedds#950.

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
eboasson pushed a commit to eboasson/cyclonedds that referenced this issue Oct 7, 2021
Destructors are not executed for untyped midrule actions because Bison
does not know which destructor to run. annotation_appl nodes were not
cleaned up if the annotation_appl could not be successfully finalized.
Remove use of midrule actions in annotation_appl as some platforms still
ship with Bison 3.0.4.

Fixes eclipse-cyclonedds#950.

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
eboasson pushed a commit that referenced this issue Oct 8, 2021
Destructors are not executed for untyped midrule actions because Bison
does not know which destructor to run. annotation_appl nodes were not
cleaned up if the annotation_appl could not be successfully finalized.
Remove use of midrule actions in annotation_appl as some platforms still
ship with Bison 3.0.4.

Fixes #950.

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
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

No branches or pull requests

1 participant