Skip to content

Conversation

jketema
Copy link
Contributor

@jketema jketema commented Apr 22, 2022

Currently the extractor incorrectly emits -1 0 for the array data below:

struct myStruct { // c
   ...
   char data[]; // v
};

This will change with the next version of EDG, and no size will be emitted anymore. This PR makes sure Buffer.qll handles arrays without sizes.

This is a separate PR to ensure these these changes do not get lost in a much larger PR and to be able to check that this doesn't cause any regressions already before the EDG upgrade.

@jketema jketema requested a review from a team as a code owner April 22, 2022 10:53
@github-actions github-actions bot added the C++ label Apr 22, 2022
@jketema jketema force-pushed the buffer branch 2 times, most recently from 12212c1 to 01d9d61 Compare April 22, 2022 11:04
Copy link
Contributor

@MathiasVP MathiasVP left a comment

Choose a reason for hiding this comment

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

LGTM assuming DCA is happy. Just one minor question.

geoffw0
geoffw0 previously approved these changes Apr 22, 2022
Copy link
Contributor

@geoffw0 geoffw0 left a 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 maintaining this code!

Currently the extractor incorrectly emits 0 for the array `data` below:
```
struct myStruct { // c
   ...
   char data[]; // v
};
```
This will change in the future, and  no size will be emitted anymore.
This commit makes sure `Buffer.qll` handles arrays without sizes.
@jketema
Copy link
Contributor Author

jketema commented Apr 24, 2022

DCA experiment looks good.

@jketema jketema requested review from MathiasVP and geoffw0 April 25, 2022 07:41
Copy link
Contributor

@MathiasVP MathiasVP left a comment

Choose a reason for hiding this comment

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

LGTM!

@MathiasVP MathiasVP merged commit e8b6bfb into github:main Apr 25, 2022
@jketema jketema deleted the buffer branch April 25, 2022 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants