Bypass denormals-to-zero assertion when running under Valgrind - #16072
Conversation
|
Welcome at Mixxx! |
daschuer
left a comment
There was a problem hiding this comment.
Thank you. The code looks good..
We only waif for confirmation that you have signed the CLA
Done. |
d1ac51e to
1202eee
Compare
|
Fixed the pre-commit code style check — adjusted indentation of the |
|
Oh I see that unfortunately pre-commit is still complaining. The recommended way to solve it is to run pre-commit locally. The other option is to apply the patch from the faulty workflow run. |
Valgrind intentionally does not emulate SSE DAZ/FTZ modes, so the DBL_MIN / 2 == 0.0 check always fails under Valgrind. Detect this at runtime using RUNNING_ON_VALGRIND and skip the assertion. The include is guarded with __has_include so it compiles cleanly on systems without valgrind-dev installed. Fixes mixxxdj#16053
1202eee to
1aefc3f
Compare
|
Applied the pre-commit patch — the only issue was a long |
|
LGTM! Thank you! |
When running Mixxx under Valgrind, the denormals-to-zero verification assertion fails:
This happens because Valgrind intentionally does not emulate SSE DAZ/FTZ modes and instead uses standard IEEE 754 floating-point behavior, so
DBL_MIN / 2produces a subnormal value rather than0.0.This patch detects Valgrind at runtime using the
RUNNING_ON_VALGRINDmacro from<valgrind/valgrind.h>and skips the assertion in that case. The include is guarded with__has_includeso it compiles cleanly on systems withoutvalgrind-devinstalled.Both
sounddeviceportaudio.cppandsounddevicenetwork.cppare patched since they share the same assertion.Fixes #16053