Skip to content

Conversation

3manifold
Copy link

@3manifold 3manifold commented Jul 17, 2025

Temporarily introduced a memory leak in an operator to check that asan works:
https://github.com/OpenNMT/CTranslate2/actions/runs/16419223767/job/46392885237#logs

@3manifold 3manifold changed the title Mem checks M checks Jul 17, 2025
@3manifold 3manifold force-pushed the asan branch 6 times, most recently from 39b44c1 to efc5ee8 Compare July 17, 2025 13:34
@3manifold 3manifold force-pushed the asan branch 3 times, most recently from 5659d05 to 0efd96b Compare July 18, 2025 12:59
@3manifold 3manifold changed the title M checks [Test Feature] Integrate Google AddressSanitizer (aka ASan) in tests Jul 18, 2025
@3manifold 3manifold changed the title [Test Feature] Integrate Google AddressSanitizer (aka ASan) in tests Integrate Google AddressSanitizer (aka ASan) in tests Jul 18, 2025
- name: Test ASAN
if: matrix.backend == 'asan'
run: |
ASAN_OPTIONS=detect_leaks=1:print_stats=1 tests/ctranslate2_test tests/data
Copy link
Author

@3manifold 3manifold Jul 18, 2025

Choose a reason for hiding this comment

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

Force ASAN_OPTIONS=detect_leaks=1 in case os: [ubuntu-22.04] matrix expands in the future (leak detection is turned on by default on Linux).

matrix:
os: [ubuntu-22.04]
backend: [mkl, dnnl]
backend: [mkl, dnnl, asan]
Copy link
Author

Choose a reason for hiding this comment

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

Could also be in an independent job instead of build-and-test-cpp-x86_64.

@3manifold 3manifold marked this pull request as ready for review July 18, 2025 13:10
@jordimas
Copy link
Contributor

For context:


sanitizers (Archived)

This project has been archived and is no longer actively maintained.

The Sanitizers project, which includes AddressSanitizer, MemorySanitizer, ThreadSanitizer, LeakSanitizer, 
and more, is now archived. 

@3manifold
Copy link
Author

3manifold commented Jul 19, 2025

For context:


sanitizers (Archived)

This project has been archived and is no longer actively maintained.

The Sanitizers project, which includes AddressSanitizer, MemorySanitizer, ThreadSanitizer, LeakSanitizer, 
and more, is now archived. 

Thanks for the note. Worth noting that sanitisers still exist but are maintained under the LLVM project (link). I can attempt later to re-run them under the LLVM ecosystem (using clang compiler etc. ). I updated the PR using clang this time.

@3manifold 3manifold changed the title Integrate Google AddressSanitizer (aka ASan) in tests Integrate Clang AddressSanitizer in tests Jul 21, 2025
@3manifold 3manifold force-pushed the asan branch 2 times, most recently from 5b85a40 to 43743ae Compare July 21, 2025 13:53
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.

2 participants