Skip to content

Conversation

@MathiasVP
Copy link
Contributor

Fixes the false negative in #4266.

The general dataflow rule for flow into a LoadInstruction's memory operand requires an exact overlap. But when loading a field from a single-field struct, the overlap is a MustTotally overlap (and not a MustExactly overlap), so we need an additional rule in simpleOperandLocalFlowStep that propagates dataflow to the memory operand when the load is from a single-field struct.

Prior to this PR, we didn't detect that a load was from a single-field struct when the struct was hidden behind a typedef.

@MathiasVP MathiasVP added the C++ label Sep 15, 2020
@MathiasVP MathiasVP requested a review from a team as a code owner September 15, 2020 11:32
@MathiasVP MathiasVP requested a review from geoffw0 September 15, 2020 12:00
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.

LGTM, thanks for fixing this.

@geoffw0
Copy link
Contributor

geoffw0 commented Sep 16, 2020

The distro test failure is not plausibly related to this change (because it doesn't use any high level libraries), so I'm assuming it's just unreliable.

Merging...

@geoffw0 geoffw0 merged commit 86404af into github:main Sep 16, 2020
MathiasVP added a commit to MathiasVP/ql that referenced this pull request Sep 17, 2020
MathiasVP added a commit to MathiasVP/ql that referenced this pull request Sep 17, 2020
rdmarsh2 pushed a commit that referenced this pull request Sep 17, 2020
…ingle-field-flow

C++: Fix bad join order introduced by #4270
luchua-bc pushed a commit to luchua-bc/ql that referenced this pull request Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants