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

DAOS-16501 build: Add libsanitize #15105

Open
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

knard38
Copy link
Contributor

@knard38 knard38 commented Sep 9, 2024

Description

Add scons build option SANITIZERS allowing to use the libasan. This new option takes a list of sanitizer tool such as: AddressSanitizer (i.e. -fsanitize=address), ThreadSanitizer(i.e. -fsanitize=thread), LeakSanitizer (i.e. -fsanitize=leak), etc.

A list of the available santizer tools and their compatibility could be found in the gcc man page.

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate owners.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

TODO

Required-githooks: true

Signed-off-by: Cedric Koch-Hofer <[email protected]>
Copy link

github-actions bot commented Sep 9, 2024

Ticket title is 'LRZ: m02r01s10dao coredump - invalid free'
Status is 'Resolved'
Labels: 'lrz'
https://daosio.atlassian.net/browse/DAOS-16501

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

Miscelleneaous fixe\s.

Required-githooks: true

Signed-off-by: Cedric Koch-Hofer <[email protected]>
@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1

This comment was marked as outdated.

@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/60/execution/node/375/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/60/execution/node/349/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/60/execution/node/350/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/60/execution/node/351/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/60/execution/node/358/log

Revert gcc strigop-truncation warning.

Signed-off-by: Cedric Koch-Hofer <[email protected]>
@daosbuild1
Copy link
Collaborator

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/61/execution/node/341/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/61/execution/node/337/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/61/execution/node/359/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/61/execution/node/328/log

@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15105/61/execution/node/509/log

Revert gcc strigop-truncation warning.

Signed-off-by: Cedric Koch-Hofer <[email protected]>
@knard38
Copy link
Contributor Author

knard38 commented Feb 12, 2025

I am asking for review before the completion of the CI has it takes so much time these days and the last commit did not change a lot the PR.

@knard38 knard38 requested review from grom72 and liw February 12, 2025 16:39
@knard38
Copy link
Contributor Author

knard38 commented Feb 14, 2025

@grom72 please could you check if the latest modifications full fill your remarks.
@liw could you check if the PR is still OK for you.
Thanks in advance.

grom72 pushed a commit that referenced this pull request Feb 17, 2025
There are several issues in strncpy usage that may cause memory
corruption. Target string may not be ended by `\0` character.

Issues detected during sanitizer integration
Ref: #15105

Co-authored-by: Cedric Koch-Hofer <[email protected]>
Co-autohred-by: Tomasz Gromadzki <[email protected]>

Signed-off-by: Tomasz Gromadzki <[email protected]>

Doc-only: true
grom72 pushed a commit that referenced this pull request Feb 17, 2025
There are several issues in strncpy usage that may cause memory
corruption. Target string may not be ended by `\0` character.

Issues detected during sanitizer integration
Ref: #15105

Co-authored-by: Cedric Koch-Hofer <[email protected]>
Co-autohred-by: Tomasz Gromadzki <[email protected]>

Signed-off-by: Tomasz Gromadzki <[email protected]>

Doc-only: true
grom72 pushed a commit that referenced this pull request Feb 17, 2025
There are several issues in strncpy usage that may cause memory
corruption. Target string may not be ended by `\0` character.

Issues detected during sanitizer integration
Ref: #15105

Co-authored-by: Cedric Koch-Hofer <[email protected]>
Co-autohred-by: Tomasz Gromadzki <[email protected]>

Signed-off-by: Tomasz Gromadzki <[email protected]>

Doc-only: true
grom72 pushed a commit that referenced this pull request Feb 17, 2025
There are several issues in strncpy usage that may cause memory
corruption. Target string may not be ended by `\0` character.

Issues detected during sanitizer integration
Ref: #15105

Co-authored-by: Cedric Koch-Hofer <[email protected]>
Co-autohred-by: Tomasz Gromadzki <[email protected]>

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72
Copy link
Contributor

grom72 commented Feb 17, 2025

Let me propose to keep source code related changes in a separate PR #15920.
It will be difficult to follow in the future why we change something in the source code while we "only" modify CI environment.

@grom72 grom72 removed the request for review from brianjmurrell February 17, 2025 07:30
@knard38
Copy link
Contributor Author

knard38 commented Feb 17, 2025

Let me propose to keep source code related changes in a separate PR #15920. It will be difficult to follow in the future why we change something in the source code while we "only" modify CI environment.

When, I tried to do such thing, the compiler was sometimes failing :-(

@knard38
Copy link
Contributor Author

knard38 commented Feb 17, 2025

After some discussion with @grom72 , we are postponing the landing of this PR until the PR #15920 will be landed.

grom72 added a commit that referenced this pull request Feb 18, 2025
Possible missing string termination after strncpy function call.

There are several places where using strncpy can cause
memory corruption - the target string may not be terminated
with `\0` character.

Issue has been detected during sanitizer integration:
#15105

Features: dfs

Signed-off-by: Tomasz Gromadzki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

8 participants