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

CFE-4254: Allow inheriting attributes using global variables in bodies having local parameters #5324

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

amousset
Copy link
Contributor

@amousset amousset commented Sep 14, 2023

This also prevents a memory corruption when an inherited attribute contains external vars but no local vars.

https://northerntech.atlassian.net/browse/CFE-4254


for (int iteration = 0; iteration < 10; iteration++)
{
bool replacement_made = false;
int var_start = -1;
char closing_brace = 0;
for (int c = 0; c < buffer_from[c]; c++)
Copy link
Contributor Author

@amousset amousset Sep 14, 2023

Choose a reason for hiding this comment

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

If I'm not missing something this does not make sense and risks stopping too early (if the input is long and its size reaches values near 0-9/a-z ascii values).

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, WTH was it meant to do...?

@amousset amousset changed the title Allow inheriting attributes using global variables in bodies having local parameters CFE-4254: Allow inheriting attributes using global variables in bodies having local parameters Sep 14, 2023
@amousset amousset force-pushed the inheritance-memory branch 2 times, most recently from e3a223e to ec6708e Compare September 14, 2023 19:08
@larsewi
Copy link
Contributor

larsewi commented Sep 20, 2023

@cf-bottom may I have a build in Jenkins please :)

@cf-bottom
Copy link

@larsewi
Copy link
Contributor

larsewi commented Sep 20, 2023

Thanks for your contribution @amousset 🚀

Could you please add the following meta data to the end of the commit message using the git commit --amend command?

Ticket: CFE-4254
Changelog: Bodies can now inherit attributes containing global variables

This would help us keep track of changes when updating change logs in upcoming releases. Additionally you can add a Signed-off-by field by appending the -s option (e.g.: git commit --amend -s). For more information on how we write our commit messages, please see CONTRIBUTING.md#commits.

in bodies having local parameters.

This also prevents a memory corruption when
an attribute contains external vars but no
local vars.

Ticket: CFE-4254
Changelog: Bodies can now inherit attributes containing global variables

Signed-off-by: Alexis Mousset <[email protected]>
@larsewi
Copy link
Contributor

larsewi commented Sep 20, 2023

Thanks 🚀 Let's hope for green CI 🤞

@larsewi
Copy link
Contributor

larsewi commented Sep 20, 2023

Aborted due to network issues. Rebuilding Build Status

Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

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

ACK


for (int iteration = 0; iteration < 10; iteration++)
{
bool replacement_made = false;
int var_start = -1;
char closing_brace = 0;
for (int c = 0; c < buffer_from[c]; c++)
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, WTH was it meant to do...?

Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

Awesome, thanks 🚀

@larsewi larsewi removed the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Sep 21, 2023
@larsewi larsewi merged commit 4632994 into cfengine:master Sep 21, 2023
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants