Skip to content

Conversation

@MathiasVP
Copy link
Contributor

Due to historical reasons the predicate you supply to DataFlow::BarrierGuard (let's call it p) is actually called with the converted expression (see here). Because of this, p must handle possible conversions on the expression.

We do this in all other DataFlow::BarrierGuard cases, but not on this one.

I didn't manage to write a testcase that broke with the current barrier guard implementation, but it fixes a bunch of regressions when upgrading to the shared guards library.

@MathiasVP MathiasVP requested a review from a team as a code owner September 15, 2025 21:20
Copilot AI review requested due to automatic review settings September 15, 2025 21:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a barrier implementation in the cpp/unbounded-write security query by ensuring proper handling of expression conversions in the barrier guard logic. The fix addresses regressions that occur when upgrading to the shared guards library.

Key Changes

  • Updates the barrier guard to use converted expressions instead of unconverted expressions
  • Aligns the implementation with other DataFlow::BarrierGuard cases in the codebase

@github-actions github-actions bot added the C++ label Sep 15, 2025
@MathiasVP MathiasVP added the no-change-note-required This PR does not need a change note label Sep 15, 2025
@jketema jketema merged commit 6264f46 into github:main Sep 16, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C++ no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants