Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support __builtin_dynamic_object_size #8156

Merged

Conversation

tautschnig
Copy link
Collaborator

Use the same approximation of the behaviour as we already did for __builtin_object_size.

Fixes: #8116

  • 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.

Use the same approximation of the behaviour as we already did for
`__builtin_object_size`.

Fixes: diffblue#8116
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (69bb2b6) 79.09% compared to head (873727c) 79.09%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8156      +/-   ##
===========================================
- Coverage    79.09%   79.09%   -0.01%     
===========================================
  Files         1695     1695              
  Lines       196583   196585       +2     
===========================================
- Hits        155496   155495       -1     
- Misses       41087    41090       +3     

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

Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓Just out of interest, would it actually be possible to return the precise result?

@peterschrammel peterschrammel removed their assignment Mar 12, 2024
@tautschnig
Copy link
Collaborator Author

❓Just out of interest, would it actually be possible to return the precise result?

I believe "precise" would mean returning exactly what (some version of) gcc returns for a given program. We could make some assumptions as to what "known [to GCC] at compile time," but I'm not sure whether this would be of much help.

@tautschnig tautschnig merged commit e7520d0 into diffblue:develop Mar 15, 2024
38 of 39 checks passed
@tautschnig tautschnig deleted the features/__builtin_dynamic_object_size branch March 15, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants