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

ORC-1841: [C++][CI] Add UBSAN support to Cmake #2117

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

Conversation

luffy-zh
Copy link
Contributor

What changes were proposed in this pull request?

Add support for UBASN in CMake options and enable it by default in the CI workflow.

Why are the changes needed?

Detect undefined behavior issues with the help of the undefined sanitizer.

How was this patch tested?

Pass all CIs.

Was this patch authored or co-authored using generative AI tooling?

NO.

CXX: ${{ matrix.cxx }}
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_UBSAN=ON -DBUILD_JAVA=OFF
Copy link
Member

Choose a reason for hiding this comment

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

Can we enable ASan and UBSan in the same workflow?

CXX: ${{ matrix.cxx }}
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_UBSAN=ON -DBUILD_JAVA=OFF
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should turn on following options:
-DBUILD_ENABLE_AVX512=ON -DBUILD_CPP_ENABLE_METRICS=ON

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do we need to collect metrics in a CI workflow?

Copy link
Contributor

@ffacs ffacs Jan 23, 2025

Choose a reason for hiding this comment

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

Why do we need to collect metrics in a CI workflow?

There are some codes only enabled when the macroENABLE_METRICS is defined, we need to check them too.

@github-actions github-actions bot added the CPP label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants