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

Don't suppress UBSan unless compiling with UBSan #556

Merged
merged 1 commit into from
Nov 11, 2019

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Nov 8, 2019

Recently added SOTER_ED25519_NO_UBSAN macro is expanded into UBSan tweaks even when we do not compile with Undefined Behavior sanitizer enabled. This can produce ugly warnings on systems that do not support all of the sanitizer flags:

compiler warnings

Let's just expand this macro into a no-op if we are not compiling with sanitizers. That's easier than deducing exactly which sanitizer flags are supported to avoid compiler warnings.

Checklist

  • Change is covered by automated tests
  • Benchmark results are attached (not relevant)
  • The coding guidelines are followed
  • Public API has proper documentation (private changes)
  • Example projects and code samples are updated (no API changes)
  • Changelog is updated if needed (not interesting)

Recently added SOTER_ED25519_NO_UBSAN macro is expanded into UBSan
tweaks even when we do not compile with Undefined Behavior sanitizer
enabled. This can produce ugly warnings on systems that do not support
all of the sanitizer flags.

Let's just expand this macro into a no-op if we are not compiling with
sanitizers. That's easier that deducing exactly which sanitizer flags
are supported to avoid compiler warnings.
@ilammy ilammy added the core Themis Core written in C, its packages label Nov 8, 2019
@ilammy ilammy merged commit 61365d0 into cossacklabs:master Nov 11, 2019
@ilammy ilammy deleted the ubsan-warnings branch November 11, 2019 14:53
ilammy added a commit to ilammy/themis that referenced this pull request Nov 16, 2019
Recently added SOTER_ED25519_NO_UBSAN macro is expanded into UBSan
tweaks even when we do not compile with Undefined Behavior sanitizer
enabled. This can produce ugly warnings on systems that do not support
all of the sanitizer flags.

Let's just expand this macro into a no-op if we are not compiling with
sanitizers. That's easier that deducing exactly which sanitizer flags
are supported to avoid compiler warnings.

(cherry picked from commit 61365d0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Themis Core written in C, its packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants