-
Notifications
You must be signed in to change notification settings - Fork 277
Do not define project(CBMC ...) twice to fix CMake failures #8435
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8435 +/- ##
========================================
Coverage 78.34% 78.34%
========================================
Files 1726 1726
Lines 188769 188769
Branches 18503 18503
========================================
Hits 147891 147891
Misses 40878 40878 ☔ View full report in Codecov by Sentry. |
`project(P, ...)` sets the CMake variablee `P_SOURCE_DIR` to whichever directory that CMake file is in. We happen to rely on the value of `CBMC_SOURCE_DIR` in several places. Invoking `project(P, ...)` twice in different directories for the same value of `P` will cause hard-to-reproduce behaviour. Even though this duplication was in place ever since, 7949cac, we apparently got lucky until a few days ago. Now, however, we see sporadic failures on GitHub runners, such as https://github.com/diffblue/cbmc/actions/runs/10677152028/job/29591809621. GitHub's runner image notes do not point out any recent change to CMake, but it might as well be changes to the kernel's scheduler.
e14c2eb
to
aeeb39f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving as a suitable fix for now. Reading it there seems to be some tension between CBMC_SOURCE_DIR
and SRC
neither of which are where the source code lives. Maybe disambiguating with CBMC_ROOT_DIR
might be clearer... but this is an improvement and not necessary for now.
This release addresses build failures on aarch64 (64-bit ARM) platforms (via PR diffblue#8366) and for some CMake configurations (via PR diffblue#8435). Users of loop invariants with dynamic frames have two changes to their user experience: 1) Users will no longer need to give unwinding specifications for `do { ... } while(0)` loops. 2) Loop invariants that are conjunctions will be turned into more fine-grained properties to ease debugging of loop invariants when they aren't successfully proved.
project(P, ...)
sets the CMake variableeP_SOURCE_DIR
to whicheverdirectory that CMake file is in. We happen to rely on the value of
CBMC_SOURCE_DIR
in several places. Invokingproject(P, ...)
twicein different directories for the same value of
P
will causehard-to-reproduce behaviour. Even though this duplication was in place
ever since, 7949cac, we apparently got lucky until a few days ago.
Now, however, we see sporadic failures on GitHub runners, such as
https://github.com/diffblue/cbmc/actions/runs/10677152028/job/29591809621.
GitHub's runner image notes do not point out any recent change to CMake,
but it might as well be changes to the kernel's scheduler.