Skip to content

Correctly detect address sanitizer with Clang#1712

Merged
zuiderkwast merged 1 commit intovalkey-io:unstablefrom
zuiderkwast:asan-clang
Feb 11, 2025
Merged

Correctly detect address sanitizer with Clang#1712
zuiderkwast merged 1 commit intovalkey-io:unstablefrom
zuiderkwast:asan-clang

Conversation

@zuiderkwast
Copy link
Contributor

@zuiderkwast zuiderkwast commented Feb 11, 2025

Fixes the failure trying to use dlopen with DEEPBIND with ASAN when compiling with Clang:

==90510==You are trying to dlopen a /home/runner/work/valkey/valkey/tests/modules/keyspecs.so shared library with RTLD_DEEPBIND flag which is incompatible with sanitizer runtime (see google/sanitizers#611 for details). If you want to run /home/runner/work/valkey/valkey/tests/modules/keyspecs.so library under sanitizers please remove RTLD_DEEPBIND from dlopen flags.

https://github.com/valkey-io/valkey/actions/runs/13261241213/job/37018133361

The previous check only covers GCC.

Additionally, don't require GLIBC when FreeBSD is used. FreeBSD has it's own libc which supports DEEPBIND according to its docs.

Follow-up of #1703, #1707

Copy link
Member

@rjd15372 rjd15372 left a comment

Choose a reason for hiding this comment

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

@zuiderkwast Thanks for fixing this!

@codecov
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.12%. Comparing base (4e0149a) to head (7ed5500).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1712      +/-   ##
============================================
+ Coverage     71.11%   71.12%   +0.01%     
============================================
  Files           123      123              
  Lines         65541    65541              
============================================
+ Hits          46610    46619       +9     
+ Misses        18931    18922       -9     
Files with missing lines Coverage Δ
src/module.c 9.61% <ø> (ø)

... and 14 files with indirect coverage changes

@zuiderkwast zuiderkwast merged commit 4467556 into valkey-io:unstable Feb 11, 2025
50 checks passed
@zuiderkwast zuiderkwast deleted the asan-clang branch February 11, 2025 20:12
xbasel pushed a commit to xbasel/valkey that referenced this pull request Mar 27, 2025
Fixes the failure trying to use dlopen with DEEPBIND with ASAN when
compiling with Clang:

==90510==You are trying to dlopen a
/home/runner/work/valkey/valkey/tests/modules/keyspecs.so shared library
with RTLD_DEEPBIND flag which is incompatible with sanitizer runtime
(see google/sanitizers#611 for details). If
you want to run
/home/runner/work/valkey/valkey/tests/modules/keyspecs.so library under
sanitizers please remove RTLD_DEEPBIND from dlopen flags.


https://github.com/valkey-io/valkey/actions/runs/13261241213/job/37018133361

The previous check only covers GCC.

Additionally, don't require GLIBC when FreeBSD is used. FreeBSD has it's
own libc which supports DEEPBIND according to its docs.

Follow-up of valkey-io#1703, valkey-io#1707

Signed-off-by: Viktor Söderqvist <[email protected]>
xbasel pushed a commit to xbasel/valkey that referenced this pull request Mar 27, 2025
Fixes the failure trying to use dlopen with DEEPBIND with ASAN when
compiling with Clang:

==90510==You are trying to dlopen a
/home/runner/work/valkey/valkey/tests/modules/keyspecs.so shared library
with RTLD_DEEPBIND flag which is incompatible with sanitizer runtime
(see google/sanitizers#611 for details). If
you want to run
/home/runner/work/valkey/valkey/tests/modules/keyspecs.so library under
sanitizers please remove RTLD_DEEPBIND from dlopen flags.


https://github.com/valkey-io/valkey/actions/runs/13261241213/job/37018133361

The previous check only covers GCC.

Additionally, don't require GLIBC when FreeBSD is used. FreeBSD has it's
own libc which supports DEEPBIND according to its docs.

Follow-up of valkey-io#1703, valkey-io#1707

Signed-off-by: Viktor Söderqvist <[email protected]>
murphyjacob4 pushed a commit to enjoy-binbin/valkey that referenced this pull request Apr 13, 2025
Fixes the failure trying to use dlopen with DEEPBIND with ASAN when
compiling with Clang:

==90510==You are trying to dlopen a
/home/runner/work/valkey/valkey/tests/modules/keyspecs.so shared library
with RTLD_DEEPBIND flag which is incompatible with sanitizer runtime
(see google/sanitizers#611 for details). If
you want to run
/home/runner/work/valkey/valkey/tests/modules/keyspecs.so library under
sanitizers please remove RTLD_DEEPBIND from dlopen flags.


https://github.com/valkey-io/valkey/actions/runs/13261241213/job/37018133361

The previous check only covers GCC.

Additionally, don't require GLIBC when FreeBSD is used. FreeBSD has it's
own libc which supports DEEPBIND according to its docs.

Follow-up of valkey-io#1703, valkey-io#1707

Signed-off-by: Viktor Söderqvist <[email protected]>
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.

3 participants