Repository navigation
Library functions may require converting additional inline functions - #7475
Merged
Merged
Conversation
tautschnig
force-pushed
the
bugfixes/library-inline
branch
from
January 12, 2023 11:15
7f67b8f to
ddb5022
Compare
tautschnig
force-pushed
the
bugfixes/library-inline
branch
from
January 12, 2023 13:52
ddb5022 to
90e4a9a
Compare
tautschnig
requested review from
chris-ryder and
remi-delmas-3000
as code owners
January 12, 2023 13:52
GCC's __builtin_signbit is type-generic, and therefore does not entail a cast from float to double. Such a cast would not necessarily preserve the sign in case of NaN.
Library functions may make use of (inline) functions defined in header files. One such case is `copysignf`, which uses `signbit`, which in turn is inlined on macOS. When these functions hadn't been seen before linking the library, then converting just the `library_model` symbol table would be insufficient for it would not include functions outside our own model library. Fall back to the `goto_model` symbol table for those cases. This was originally reported via Kani in model-checking/kani#1993.
tautschnig
force-pushed
the
bugfixes/library-inline
branch
from
January 12, 2023 13:54
90e4a9a to
d8f7930
Compare
TGWDB
approved these changes
Jan 12, 2023
martin-cs
approved these changes
Jan 12, 2023
martin-cs
left a comment
Collaborator
There was a problem hiding this comment.
Following an offline discussion with @tautschnig I am confident the floating-point behaviours is "correct enough".
Codecov ReportBase: 78.48% // Head: 78.48% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7475 +/- ##
========================================
Coverage 78.48% 78.48%
========================================
Files 1663 1663
Lines 191189 191186 -3
========================================
+ Hits 150046 150054 +8
+ Misses 41143 41132 -11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
peterschrammel
approved these changes
Jan 13, 2023
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.
Library functions may make use of (inline) functions defined in header files. One such case is
copysignf, which usessignbit, which in turn is inlined on macOS. When these functions hadn't been seen before linking the library, then converting just thelibrary_modelsymbol table would be insufficient for it would not include functions outside our own model library. Fall back to thegoto_modelsymbol table for those cases.This was originally reported via Kani in
model-checking/kani#1993.