Skip to content

Unpack pointer null state prior to comparison in modeling Abseil's CHECK_NE, in case it is Top#677

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
test_883112571
Open

Unpack pointer null state prior to comparison in modeling Abseil's CHECK_NE, in case it is Top#677
copybara-service[bot] wants to merge 1 commit intomainfrom
test_883112571

Conversation

@copybara-service
Copy link

Unpack pointer null state prior to comparison in modeling Abseil's CHECK_NE, in case it is Top

CHECK_NE is implemented with
... = absl::...::Check_NEImpl(GetReferenceableValue(lhs), GetReferenceableValue(rhs)) as a component.

Since GetReferenceableValue(lhs) only passes along a reference to lhs,
we never see the LValueToRValue conversion where we normally do unpacking
for raw pointers. The value is "used" within the other Check_NEImpl
helper function, but that means it is not visible in the current function.
Fix by modeling as if the LValueToRValue happened in the current function.

…ECK_NE, in case it is Top

CHECK_NE is implemented with
`... = absl::...::Check_NEImpl(GetReferenceableValue(lhs), GetReferenceableValue(rhs))` as a component.

Since `GetReferenceableValue(lhs)` only passes along a reference to `lhs`,
we never see the LValueToRValue conversion where we normally do unpacking
for raw pointers. The value is "used" within the other `Check_NEImpl`
helper function, but that means it is not visible in the current function.
Fix by modeling as if the LValueToRValue happened in the current function.

PiperOrigin-RevId: 883112571
@google-cla
Copy link

google-cla bot commented Mar 13, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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

Successfully merging this pull request may close these issues.

0 participants