Skip to content

Unpack any Top pointer null state prior to comparison in modeling Abseil's CHECK_NE#676

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

Unpack any Top pointer null state prior to comparison in modeling Abseil's CHECK_NE#676
copybara-service[bot] wants to merge 1 commit intomainfrom
test_882897538

Conversation

@copybara-service
Copy link

Unpack any Top pointer null state prior to comparison in modeling Abseil's CHECK_NE

CHECK_NE is implemented with
const char* s = 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 the use is not visible in the current function.
Fix by modeling as if the LValueToRValue happened in this function.

…eil's CHECK_NE

CHECK_NE is implemented with
`const char* s = 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 the use is not visible in the current function.
Fix by modeling as if the LValueToRValue happened in this function.

PiperOrigin-RevId: 882897538
@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