https://bugs.kde.org/show_bug.cgi?id=385868

            Bug ID: 385868
           Summary: glibc ld.so _dl_runtime_resolve_avx_slow conditional
                    jump warning
           Product: valgrind
           Version: 3.13.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: m...@klomp.org
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to