Skip to content

Fix builtin function return hidden flag inconsistency#8800

Open
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-5207-hidden
Open

Fix builtin function return hidden flag inconsistency#8800
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-5207-hidden

Conversation

@tautschnig
Copy link
Collaborator

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

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig force-pushed the fix-5207-hidden branch 2 times, most recently from 9f1f36b to 64d8732 Compare December 9, 2025 18:29
@tautschnig tautschnig marked this pull request as ready for review December 9, 2025 18:46
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.01%. Comparing base (b191cc1) to head (5145ed9).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8800   +/-   ##
========================================
  Coverage    80.01%   80.01%           
========================================
  Files         1700     1700           
  Lines       188345   188345           
  Branches        73       73           
========================================
+ Hits        150696   150697    +1     
+ Misses       37649    37648    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tautschnig tautschnig force-pushed the fix-5207-hidden branch 2 times, most recently from 08b0ca8 to c17ccd5 Compare March 10, 2026 22:12
Copilot AI review requested due to automatic review settings March 10, 2026 22:12
Copy link

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

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 hidden value on the call frame for later use by return handling.
  • Add a regression test that asserts hidden="false" / "hidden": false for both function-call and function-return steps for malloc in 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.

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) <kiro-agent@users.noreply.github.com>

Fixes: diffblue#5207
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.

Built-in function returns hidden in json and xml traces

3 participants