Subject: Re: GCC strcmp optimizations causing valgrind uninitialized conditional jumps

From: Segher Boessenkool <[email-masked]>
Date: Tue, 3 Jul 2018 13:46:18 -0500

Hi!

On Tue, Jul 03, 2018 at 11:26:55AM -0700, William Kennington wrote:
> I've noticed while trying to do some valgrind testing on code linked
> against system libraries that have inlined strcmps that valgrind is
> unhappy about branches depending on uninitialized memory. I've read

The branches here do *not* depend on uninitialised memory.  Valgrind
does not realise that however.  The valgrind people are aware of this
problem.

> Any ideas on how to workaround / fix this?

Does -fno-builtin-strcmp do the trick?

Segher