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

Extend AddressSanitizer to all iceoryx components #424

Closed
prasannabhat opened this issue Dec 11, 2020 · 3 comments
Closed

Extend AddressSanitizer to all iceoryx components #424

prasannabhat opened this issue Dec 11, 2020 · 3 comments
Labels
tooling All iceoryx related tooling (scripts etc.)

Comments

@prasannabhat
Copy link
Contributor

prasannabhat commented Dec 11, 2020

Brief feature description

At the moment iceoryx_posh & iceoryx_core components are sanitized using AddressSanitizer(including built in LeakSanitizer).
Extend this to all iceoryx components (including tests)

Detailed information

Using sanitizers in all the components could be useful in keeping potential bugs away.
This issue could be followed by #423 , when existing issues are addressed.

How to do it ?

Compiler flags required for sanitization are already defined ICEORYX_SANITIZER_FLAGS.
Compile and link the required component with this flag.
e.g.

target_link_libraries(iceoryx_posh 
     ...
    PRIVATE
   ${ICEORYX_SANITIZER_FLAGS}
)
target_compile_options(iceoryx_posh PRIVATE ${ICEORYX_WARNINGS} ${ICEORYX_SANITIZER_FLAGS})`
@dkroenke dkroenke added the tooling All iceoryx related tooling (scripts etc.) label Dec 12, 2020
@dkroenke
Copy link
Member

With #452 the sanitizer flags are passed to all libraries and all examples and tests.
But what i encountered was that the leaksanitizer does not work on the Github CI properly. This should be checked.

I added to the workflow file ../tools/run_all_tests.sh with the argument asan-only to use the asan flags only as workaround. But this should be checked what the problem there is. You can just remove the argument and then the leaksan is used too.

@prasannabhat
Copy link
Contributor Author

@dkroenke I have enabled leaksanitizer in github CI in PR #461
This is working fine.
There is one known issue that leansanitizer wont run in mac (it runs in linux runner, so its basically covered)

@dkroenke
Copy link
Member

@prasannabhat On master the Sanitizer flags are passed to all iceoryx components (test, examples, production code) and running on the CI.
Therefore I close this ticket here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling All iceoryx related tooling (scripts etc.)
Projects
None yet
Development

No branches or pull requests

2 participants