glibc ld.so has an optimization when resolving a symbol that checks whether or not the upper 128 bits of the ymm registers are zero. If so it uses "cheaper" instructions to save/restore them using the xmm registers. If those upper 128 bits contain undefined values memcheck will issue an Conditional jump or move depends on uninitialised value(s) warning whenever trying to resolve a symbol. https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/dl-trampoline.h#l53 Apparently it is cheaper to check the upper bits are set than to invoke AVX unnecessarily (it is more energy efficient if you only use sse instructions on some CPUs so the cores don't have to "power up" the full AVX engine). This triggers in our sh-mem-vecxxx test cases because we there explicitly make sure those bits are (partially) undefined. We can workaround it my just resolving all symbols early. Which is what my first patch does. But Tom Hughes said it might be better to make this a generic default suppression. I haven't seen this trigger outside the testsuite. But I guess that does make sense. That is patch number 2.
Created attachment 108407 [details] Test case workaround
Created attachment 108408 [details] Add default suppression for _dl_runtime_resolve_avx_slow
I went with the global suppression instead of the testcase workaround. commit f844689f858d4bb744e59eadaaf984d3fd0b5b50 Author: Mark Wielaard <mark@klomp.org> Date: Tue Oct 17 17:49:26 2017 +0200 Suppress _dl_runtime_resolve_avx_slow for memcheck conditional.
Please state the version of glibc ld.so where this problem was observed. That bounds the search for interactions between software. The link to ld.so code at sourceware.org only points to the current version, so can become stale.
(In reply to John Reiser from comment #4) > Please state the version of glibc ld.so where this problem was observed. > That bounds the search for interactions between software. The link to ld.so > code at sourceware.org only points to the current version, so can become > stale. glibc-2.17-196.el7.x86_64 (probably had the code backported) and glibc-2.25-10.fc26.x86_64