Skip to content

Conversation

@pratikmankawde
Copy link
Collaborator

High Level Overview of Change

Added support for Sanitizer build options in CI builds workflow.

Context of Change

We want to run Address and Thread sanitizers with Undefined-behaviour sanitizer while running tests on CI.
Build type: asan+ubsan & tsan+ubsan

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

Signed-off-by: Pratik Mankawde <[email protected]>
Copy link
Contributor

@mathbunnyru mathbunnyru left a comment

Choose a reason for hiding this comment

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

I don't see tests running on this PR, and I would be quite surprised if they just passed without any code changes.

@bthomee please take a look why workflows haven't started

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.3%. Comparing base (f28ba57) to head (10a422d).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5996   +/-   ##
=======================================
  Coverage     78.2%   78.3%           
=======================================
  Files          816     816           
  Lines        68948   68887   -61     
  Branches      8352    8311   -41     
=======================================
- Hits         53950   53934   -16     
+ Misses       14998   14953   -45     

see 8 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pratikmankawde pratikmankawde marked this pull request as draft November 6, 2025 09:34
@pratikmankawde pratikmankawde marked this pull request as ready for review November 6, 2025 10:12
{% endif %}

[conf]
{% if compiler == "gcc" %}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These settings allows building with sanitizers locally.

Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Signed-off-by: Pratik Mankawde <[email protected]>
Copy link
Contributor

@mathbunnyru mathbunnyru left a comment

Choose a reason for hiding this comment

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

Btw, I think I came up with better SANITIZERS env variable usage.

Instead of silently making Address be Address+Undefined, let's allow more complex values in SANITIZERS value.

The algorithm would be as follows:
if SANITIZERS is not empty, common flags will be added.
if it has Address as a substr, address-specific sanitizer flags.
if it has Underfined as a substr, undefined-specific.
And so on.

You will have to do it carefully, so -fsanitize is properly populated.

And instead of having docs saying Address is actually Address+Undefined, you will set env variable to AddressUndefined

And this would also make more sense when we merge the logic with Clio - we use sanitizers separately, and my approach easily allows it

@pratikmankawde pratikmankawde force-pushed the pratik/Add-sanitizers-to-CI-builds branch from 04ddea5 to 6e32392 Compare November 21, 2025 12:18
@@ -0,0 +1,16 @@
# Suppress voilations in Boost libraries
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have kept the *.supp, sanitizer suppressions files in the external folder for now. I am open for suggestions though.

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.

4 participants