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

ci-c-util: support running with sanitizers #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mrc0mmand
Copy link

Support building and testing with various sanitizers (currently only
ASan and UBsan are supported out of the box).

Signed-off-by: Frantisek Sumsal [email protected]


Hey!

I finally got some time to work on bus1/dbus-broker#281 (comment) and this is the first take. The idea is to run the test suite in the bus1/dbus-broker repository with a snippet like:

  ci-sanitizers:
    name: CI with Address and Undefined Behavior sanitizers
    uses: bus1/cabuild/.github/workflows/ci-c-util.yml@v1
    with:
      cabuild_ref: "v1"
      matrixmode: true
      sanitizers: "address,undefined"

Unfortunately, I can't easily test this without reconfiguring image locations and pushing everything where it needs to be, so any insight or comments are very welcome.

/cc @evverx

Add the compiler-rt package which contains static and dynamic libraries
for ASan and UBSan under LLVM.

Signed-off-by: Frantisek Sumsal <[email protected]>
Support building and testing with various sanitizers (currently only
ASan and UBsan are supported out of the box).

Signed-off-by: Frantisek Sumsal <[email protected]>
@evverx
Copy link

evverx commented Aug 9, 2022

@mrc0mmand thanks! I was kind of going to send a PR like that but I wasn't sure how cabuild worked.

The idea is to run the test suite in the bus1/dbus-broker repository with a snippet like

I'm just spitballing but I wonder if the tests could be run directly on Ubuntu? As far as I can see https://github.com/bus1/dbus-broker/blob/main/.github/workflows/codeql.yml builds and analyzes dbus-broker outside of any images.

currently only ASan and UBsan are supported out of the box

Given that as far as I can see there is a job running the unit tests under Valgrind I think ASan and UBSan on top should be enough to catch all kinds of issues.

Anyway, I'd need to figure out how cabuild works before leaving meaningful comments here :-)

@dvdhrm
Copy link
Member

dvdhrm commented Aug 9, 2022

(traveling for 2 weeks, I will have a proper look when back)

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