Fix builtin function return hidden flag inconsistency#8800
Open
tautschnig wants to merge 1 commit into
Open
Conversation
9f1f36b to
64d8732
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8800 +/- ##
===========================================
- Coverage 80.69% 80.68% -0.01%
===========================================
Files 1714 1714
Lines 189597 189598 +1
Branches 73 73
===========================================
- Hits 152987 152983 -4
- Misses 36610 36615 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
08b0ca8 to
c17ccd5
Compare
There was a problem hiding this comment.
Pull request overview
Fixes an inconsistency where built-in function return events could have a different hidden flag than their corresponding function call, by storing the combined hidden flag on the call frame and adding regression coverage for JSON/XML UIs.
Changes:
- Store the combined
hiddenvalue on the call frame for later use by return handling. - Add a regression test that asserts
hidden="false"/"hidden": falsefor both function-call and function-return steps formallocin XML and JSON UIs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/goto-symex/symex_function_call.cpp | Persists the combined hidden flag on the call frame to keep call/return hidden status consistent. |
| regression/cbmc/builtin-function-hidden-flag/test.c | Adds a minimal program that triggers a built-in (malloc) call and a failing assertion to produce a trace. |
| regression/cbmc/builtin-function-hidden-flag/test.desc | Adds JSON-UI regression expectations for hidden: false on call and return steps. |
| regression/cbmc/builtin-function-hidden-flag/test_xml.desc | Adds XML-UI regression expectations for hidden="false" on call and return steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c17ccd5 to
5145ed9
Compare
A function-return event could be hidden while its matching function-call event was not, making it hard to filter internal trace steps yet still pair calls with returns (issue diffblue#5207). The function-call event uses the combined caller/callee hidden flag, whereas the function-return event read frame.hidden_function (the callee's own is_hidden()), so the two disagreed for a hidden function invoked from a visible caller. Store the call event's hidden flag separately on the frame (hidden_function_call) and reuse it for the matching function-return event, leaving frame.hidden_function to drive body/internal-step hiding. Call and return now stay consistent without un-hiding the body of a hidden function: its CPROVER_HIDE-marked steps remain hidden regardless of the caller. Co-authored-by: Kiro <kiro-agent@users.noreply.github.com> Fixes: diffblue#5207
5145ed9 to
219e49a
Compare
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.
Function returns for built-in functions now correctly match their function call hidden flag. This is done by symex storing the combined hidden flag in call frame.
Co-authored-by: Kiro autonomous agent
Fixes: #5207