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

Add Boost.Build variants for UBSan-enabled builds #99

Merged
merged 1 commit into from
Jun 21, 2018

Conversation

mloskot
Copy link
Member

@mloskot mloskot commented Jun 20, 2018

(NOTE: Assigned to self - if accepted, I'd like to merge myself. Thanks.)

Description: what does this pull request do?

The build variants enable group of checks offered by clang
UndefinedBehaviorSanitizer detector.

Add sanitizers suppression file in .ci/blacklist.supp based on copy of the file from Boost.Beast.

Update Travis CI:

  • Add build jobs for each of the three new UBSan variants.
  • Display COMPILER and VARIANT first as these two are most important
    details while inspecting the build matrix
    (TOOLSET can be derived from COMPILER).

Tasklist

  • Set The Grand Merge milestone (@stefanseefeld OK?)
  • Review
  • Adjust for comments
  • All CI builds and checks have passed

I've built the UBSan variants and there are issues - to be checked/fixed after this is merged.

@mloskot mloskot self-assigned this Jun 20, 2018
@mloskot mloskot requested a review from a team June 20, 2018 20:13
@mloskot mloskot force-pushed the ml/add-ubsan-build-variant branch from a7c23fb to 6761ee6 Compare June 20, 2018 20:17
@mloskot mloskot added this to the The Grand Merge milestone Jun 20, 2018
@mloskot mloskot added the cat/enhancement Improvements, but not fixes addressing identified bugs label Jun 20, 2018
@mloskot
Copy link
Member Author

mloskot commented Jun 20, 2018

First build of this PR at https://travis-ci.org/boostorg/gil/builds/394728281 suggests that variant=debug,release merge can cause timeouts.
However, it's interesting that the 1st (GCC 5) and 4th (clang 3.9) builds completed in ~20 minutes.
I'd keep variant=release only really or may be have one debug with the latest GCC.

Question

Do we really need to build both variants, debug and release for every compiler version?

@stefanseefeld
Copy link
Member

what is the nature of the timeout ? Would it help to split builds up, so "release" and "debug" would be separate builds ? (Given that we discovered certain failures only with particular compiler flags (optimization, notably), I'd very much prefer to keep the coverage. If any, we should remove the debug builds.
And yes, I observed excessively long compilation times with certain gcc versions (interestingly, more recent versions).

@mloskot mloskot force-pushed the ml/add-ubsan-build-variant branch from 6761ee6 to c5fc9b0 Compare June 21, 2018 06:34
@mloskot
Copy link
Member Author

mloskot commented Jun 21, 2018

@stefanseefeld

what is the nature of the timeout ?

Not sure I get your question, but https://docs.travis-ci.com/user/customizing-the-build#Build-Timeouts

When a job produces no log output for 10 minutes.
When a job on a public repository takes longer than 50 minutes.
When a job on a private repository takes longer than 120 minutes.

Would it help to split builds up, so "release" and "debug" would be separate builds ?

That is what we have been doing, and I proposed to merge the two variants into single build job.

I'd very much prefer to keep the coverage.

No problem, I have reverted the merging of build variants and the build jobs coverage is back to the original, see https://travis-ci.org/boostorg/gil/builds/394879984

And yes, I observed excessively long compilation times with certain gcc versions (interestingly, more recent versions).

This is quite a curiosity. Also the latest build above shows that GCC 5 is blazing fast comparing to 6 and 7. Perhaps, with GCC 6 and 7 we generate more detailed warnings - I imagine, stdout/stderr I/O may slow things down. If I find a moment, I will look at the detailed logs and compare them.

@mloskot mloskot force-pushed the ml/add-ubsan-build-variant branch 3 times, most recently from 208614e to e0c188d Compare June 21, 2018 10:45
Copy link
Member

@stefanseefeld stefanseefeld left a comment

Choose a reason for hiding this comment

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

This looks great. Thanks for the effort !

@mloskot mloskot force-pushed the ml/add-ubsan-build-variant branch 5 times, most recently from 14a7c20 to 8146981 Compare June 21, 2018 20:09
@mloskot
Copy link
Member Author

mloskot commented Jun 21, 2018

Thanks for the review.

To summary:

The build variants enable group of checks offered by clang
UndefinedBehaviorSanitizer detector.

Add sanitizers suppression file in .ci/blacklist.supp based on
copy of the file from Boost.Beast.

Update Travis CI:
  - Add .ci/build-and-test.sh script as handy proxy for b2 command.
  - Add build jobs for each of the three new UBSan variants.
  - Display COMPILER and VARIANT first as these two are most important
    details while inspecting the build matrix
    (TOOLSET can be derived from COMPILER).
@mloskot mloskot force-pushed the ml/add-ubsan-build-variant branch from 8146981 to 4b46a48 Compare June 21, 2018 20:26
@mloskot mloskot merged commit 34ca451 into boostorg:develop Jun 21, 2018
@mloskot mloskot deleted the ml/add-ubsan-build-variant branch June 21, 2018 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat/enhancement Improvements, but not fixes addressing identified bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants