Skip to content

Conversation

@NlightNFotis
Copy link
Contributor

@NlightNFotis NlightNFotis commented Apr 7, 2021

The rationale behind the upgrading of the version of catch is to overcome a build issue on m1/aarch64 when building under cmake.

The exact error during the build is the following, without this change is:

In file included from /Users/fotiskoutoulakis/Devel/cbmc/unit/unit_tests.cpp:10:
In file included from /Users/fotiskoutoulakis/Devel/cbmc/unit/testing-utils/use_catch.h:33:
/Users/fotiskoutoulakis/Devel/cbmc/unit/catch/catch.hpp:5772:13: error: invalid token in expression
            CATCH_BREAK_INTO_DEBUGGER();
            ^
/Users/fotiskoutoulakis/Devel/cbmc/unit/catch/catch.hpp:5490:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/fotiskoutoulakis/Devel/cbmc/unit/catch/catch.hpp:5469:34: note: expanded from macro 'CATCH_TRAP'
    #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
                                 ^
<inline asm>:1:6: note: instantiated into assembly here
        int $3
            ^
In file included from /Users/fotiskoutoulakis/Devel/cbmc/unit/unit_tests.cpp:10:
In file included from /Users/fotiskoutoulakis/Devel/cbmc/unit/testing-utils/use_catch.h:33:
/Users/fotiskoutoulakis/Devel/cbmc/unit/catch/catch.hpp:5772:13: error: invalid operand
            CATCH_BREAK_INTO_DEBUGGER();
            ^
/Users/fotiskoutoulakis/Devel/cbmc/unit/catch/catch.hpp:5490:75: note: expanded from macro 'CATCH_BREAK_INTO_DEBUGGER'
    #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
                                                                          ^
/Users/fotiskoutoulakis/Devel/cbmc/unit/catch/catch.hpp:5469:34: note: expanded from macro 'CATCH_TRAP'
    #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
                                 ^
<inline asm>:1:6: note: instantiated into assembly here
        int $3
            ^
2 errors generated.
  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • 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).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig
Copy link
Collaborator

Could you please upgrade to v2.13.5 and mark the commit as Fixes: #5840?

@NlightNFotis
Copy link
Contributor Author

@tautschnig I will look into this, yes.

@NlightNFotis NlightNFotis force-pushed the upgrade-catch-version branch from 8a5ec47 to 12a5eb6 Compare May 13, 2021 13:09
@NlightNFotis NlightNFotis changed the title Upgrade catch version to 2.13.4 Upgrade catch version to 2.13.6 May 13, 2021
Downloaded through https://github.com/catchorg/Catch2/releases/download/v2.13.6/catch.hpp

The reason for the upgrade is a problem identified when attempting
to build CBMC using CMAKE under a m1-aarch64 environment.

Fixes diffblue#5840.
@NlightNFotis NlightNFotis force-pushed the upgrade-catch-version branch 2 times, most recently from 5bf9a5b to f381498 Compare June 14, 2021 15:26
A lot of the comparisons we did previously seemed unsound -
they compared integers of different signs. Catch didn't
like this much, forcing us to change sign comparisons to
be explicit.
@NlightNFotis
Copy link
Contributor Author

Hi @tautschnig, can you take a look at the last commit of this PR please? As a sanity check.

@codecov
Copy link

codecov bot commented Jun 14, 2021

Codecov Report

Merging #6018 (38a3ea0) into develop (0002950) will increase coverage by 7.70%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6018      +/-   ##
===========================================
+ Coverage    67.40%   75.11%   +7.70%     
===========================================
  Files         1157     1450     +293     
  Lines        95236   159541   +64305     
===========================================
+ Hits         64197   119832   +55635     
- Misses       31039    39709    +8670     
Flag Coverage Δ
cproversmt2 ?
regression ?
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/goto-programs/link_goto_model.cpp 0.00% <0.00%> (-80.86%) ⬇️
src/util/string_container.cpp 52.94% <0.00%> (-47.06%) ⬇️
src/solvers/prop/prop.cpp 42.85% <0.00%> (-41.76%) ⬇️
src/solvers/flattening/boolbv_member.cpp 53.65% <0.00%> (-38.65%) ⬇️
src/cpp/cpp_storage_spec.cpp 65.00% <0.00%> (-35.00%) ⬇️
src/util/cmdline.h 66.66% <0.00%> (-33.34%) ⬇️
src/solvers/strings/array_pool.h 66.66% <0.00%> (-33.34%) ⬇️
src/solvers/strings/string_refinement.h 66.66% <0.00%> (-33.34%) ⬇️
...rs/strings/string_concatenation_builtin_function.h 0.00% <0.00%> (-33.34%) ⬇️
src/ansi-c/c_typecheck_base.cpp 50.54% <0.00%> (-30.35%) ⬇️
... and 1429 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 437675a...38a3ea0. Read the comment docs.

@NlightNFotis NlightNFotis merged commit 005d475 into diffblue:develop Jun 15, 2021
@NlightNFotis NlightNFotis deleted the upgrade-catch-version branch June 15, 2021 15:52
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.

3 participants