Repository navigation
Symex: havocking a string literal has no effect - #9496
Open
tautschnig wants to merge 1 commit into
Open
tautschnig wants to merge 1 commit into
tautschnig wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
5 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #9496 +/- ##
===========================================
+ Coverage 81.29% 81.34% +0.04%
===========================================
Files 1725 1727 +2
Lines 191680 191716 +36
Branches 73 73
===========================================
+ Hits 155835 155949 +114
+ Misses 35845 35767 -78 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
__CPROVER_havoc_object(p) with p pointing to a string literal failed the invariant "Attempted to symex havoc applied to unsupported expression", as dereferencing p yields the literal itself: a string constant for a narrow string literal, and an array for a wide or Unicode string literal or for the part of any literal that a pointer into its middle refers to. String literals and other constants are not objects whose value can change, so there is nothing to havoc. Use goto_symex_statet::is_read_only_object, which symex_assign uses to ignore writes to such objects, to recognise them. Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
tautschnig
force-pushed
the
fix/symex-havoc-string-literal
branch
from
December 2, 2026 06:21
4e8cd96 to
931a93b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
__CPROVER_havoc_object(p) with p pointing to a string literal failed the invariant "Attempted to symex havoc applied to unsupported expression", as dereferencing p yields the string constant itself. String literals (and other constants) are not objects whose value can change, so there is nothing to havoc.
Update after a review of the whole inline-assembly stack
havoc_recnow recognises read-only objects withgoto_symex_statet::is_read_only_object, assymex_assigndoes. The previous check only matchedID_string_constantand constants, which misses wide and Unicode string literals and the part of a literal that a pointer into its middle refers to: these are arrays. The test now covers both cases. It runs with--no-pointer-checkbecause of two problems on develop that are independent of this PR: reading a wide string literal gives a spurious pointer-check failure, and the SMT2 back end fails an invariant inconvert_address_of_rec.