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

Fixing sanitizer handling. Fixes nasa/fprime#2678 #227

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

LeStarch
Copy link
Collaborator

Related Issue(s)
Has Unit Tests (y/n)
Documentation Included (y/n)

Change Description

This fixes nasa/fprime#2678. Essentially, the presence of the disable sanitizer flag should disable the sanitizers. In other cases, the sanitizer handling should be left to the underlying fprime/CMake implementation.

@LeStarch LeStarch requested a review from thomas-bc November 22, 2024 20:38
Copy link
Contributor

@thomas-bc thomas-bc left a comment

Choose a reason for hiding this comment

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

.

@@ -57,11 +57,11 @@ def run_fbuild_cli(
toolchain = build.find_toolchain()
print(f"[INFO] Generating build directory at: {build.build_dir}")
print(f"[INFO] Using toolchain file {toolchain} for platform {parsed.platform}")
if parsed.ut and not parsed.disable_sanitizers:
if parsed.disable_sanitizers:
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is the only place in the system (currently) where sanitizers do get enabled. Without it, sanitizers will always be disabled unless the ENABLE_SANITIZERS_* flags are passed to CMake.

Is this the intended behavior? It feels to me that sanitizers on UTs are a good practice.

Not sure why nasa/fprime#2678 fails though...

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I should have read nasa/fprime#2678 prior to posting this lol

Are you intending to make a PR to F´ to have SANITIZERS_* = BUILD_TESTING

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My intent was to set sanitizers in CMake in F´, yes.

@LeStarch LeStarch merged commit c81b089 into nasa:devel Nov 23, 2024
29 checks passed
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.

Sanitizer Disable Does Not Work
2 participants