Skip to content

Move LIBCXX_DEBUG flag from Travis to AWS codebuild #4724

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

Merged

Conversation

smowton
Copy link
Contributor

@smowton smowton commented May 29, 2019

The Travis build takes too long to complete with this flag set; moving it to AWS CodeBuild
means we can take advantage of AWS' longer timeout and even the load between Travis and AWS.

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: f734176).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/113611993

buildspec.yml Outdated
- make -C src CXX="ccache g++" CXXFLAGS="-D_GLIBCXX_DEBUG" -j2
- make -C unit CXX="ccache g++" CXXFLAGS="-D_GLIBCXX_DEBUG" -j2
- make -C jbmc/src CXX="ccache g++" CXXFLAGS="-D_GLIBCXX_DEBUG" -j2
- make -C jbmc/unit CXX="ccache g++" CXXFLAGS="-D_GLIBCXX_DEBUG" -j2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that you are completely replacing CXXFLAGS at this point - you might actually want CXXFLAGS="-Wall -pedantic -Werror -Wno-deprecated-declarations -Wswitch-enum -D_GLIBCXX_DEBUG"

@@ -107,7 +107,6 @@ jobs:
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
env:
- COMPILER="ccache /usr/bin/g++-5"
- EXTRA_CXXFLAGS="-D_GLIBCXX_DEBUG"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that EXTRA_CXXFLAGS also applied to the unit and regression tests in our Travis config. You are not currently doing so for the buildspec. That might actually be the explanation of the error, given the particular tests that are failing.

@smowton
Copy link
Contributor Author

smowton commented May 30, 2019

You're right, the cause was compiling the little driver program provided by the invariants regression tests without -D_GLIBCXX_DEBUG, meaning that it created std::vectors which were then reinterpreted as std::__debug::vectors by libutil code, which had been compiled with the flag.

@smowton smowton force-pushed the smowton/admin/move-libcxxdebug-flag branch from f734176 to 0ab1ecd Compare May 30, 2019 09:41
@smowton
Copy link
Contributor Author

smowton commented May 30, 2019

@tautschnig pushed an alternative solution introducing CP_EXTRA_CXXFLAGS (and _CFLAGS), so it's easy to specify an addition to rather than a replacement for the default flags.

@tautschnig
Copy link
Collaborator

@smowton @xbauch Could you jointly debug the failure that's now showing up? EXIT=134 is likely an internal invariant failing, but I guess chain.sh eats up the output so it's not immediately visible in the CI log.

@smowton smowton force-pushed the smowton/admin/move-libcxxdebug-flag branch from 86857c2 to 697edd9 Compare May 30, 2019 11:18
@smowton
Copy link
Contributor Author

smowton commented May 30, 2019

@tautschnig turns out the offending code (which did indeed call std::string::back on an empty string) had been deleted upstream in the meantime, so rebased and repushed.

The Travis build takes too long to complete with this flag set; moving it to AWS CodeBuild
means we can take advantage of AWS' longer timeout and even the load between Travis and AWS.
@smowton smowton force-pushed the smowton/admin/move-libcxxdebug-flag branch from 697edd9 to 44458f6 Compare May 30, 2019 12:27
@tautschnig
Copy link
Collaborator

@smowton It seems this needs another rebase as clang-format was confused.

@smowton smowton merged commit 24cc86a into diffblue:develop May 30, 2019
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: 44458f6).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/113765649

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.

5 participants