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

--- Comment #8 from Romain Geissler <romain.geiss...@amadeus.com> ---
(In reply to Mark Wielaard from comment #7)

> Is this just for strcmp in ld.so?
> In that case the intercept in shared/vg_replace_strmem.c should in theory
> fix that.

Hi,

Yes in my case it happens only for strcmp in ld.so, I tried again just now with
an unpatched toolchain on our side, using a unittest binary that doesn't depend
on many libraries, and here is the error showed at the end of the report:

==87482== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==87482==
==87482== 1 errors in context 1 of 2:
==87482== Conditional jump or move depends on uninitialised value(s)
==87482==    at 0x4021881: strcmp (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x400ADAB: _dl_name_match_p (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x4008383: _dl_map_object (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401A034: map_doit (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x4001488: _dl_catch_exception (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x40015AE: _dl_catch_error (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401A51F: do_preload (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401B2A6: handle_preload_list (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401E0D2: dl_main (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401993E: _dl_sysdep_start (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401B04B: _dl_start (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x4019F17: ??? (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==  Uninitialised value was created by a stack allocation
==87482==    at 0x401B24A: handle_preload_list (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:strcmp
   fun:_dl_name_match_p
   fun:_dl_map_object
   fun:map_doit
   fun:_dl_catch_exception
   fun:_dl_catch_error
   fun:do_preload
   fun:handle_preload_list
   fun:dl_main
   fun:_dl_sysdep_start
   fun:_dl_start
  
obj:/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2
}
==87482==
==87482== 1 errors in context 2 of 2:
==87482== Conditional jump or move depends on uninitialised value(s)
==87482==    at 0x4021881: strcmp (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x400AD84: _dl_name_match_p (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x4008383: _dl_map_object (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401A034: map_doit (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x4001488: _dl_catch_exception (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x40015AE: _dl_catch_error (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401A51F: do_preload (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401B2A6: handle_preload_list (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401E0D2: dl_main (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401993E: _dl_sysdep_start (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x401B04B: _dl_start (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==    by 0x4019F17: ??? (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==  Uninitialised value was created by a stack allocation
==87482==    at 0x401B24A: handle_preload_list (in
/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2)
==87482==
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:strcmp
   fun:_dl_name_match_p
   fun:_dl_map_object
   fun:map_doit
   fun:_dl_catch_exception
   fun:_dl_catch_error
   fun:do_preload
   fun:handle_preload_list
   fun:dl_main
   fun:_dl_sysdep_start
   fun:_dl_start
  
obj:/remote/tools/Linux/2.6/1A/toolchain/x86_64-v23.0.8/lib/ld-linux-x86-64.so.2
}
==87482== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)



> But it looks like it is too early. Which means we might want to create a
> hardwire for it in coregrind/m_redir.c

Yes this happens very early in the dynamic library loading process, so even the
.so shared library provided by valgrind aren't loaded just yet (actually from
what I recall from my initial investigation months ago is that the compared
string came from the LD_PRELOAD variable set by valgrind to preload the
valgrind .so replacement containing strcmp and the likes.

We might want to start from scratch and use a new suppression file containing
just this specific case. For now in our toolchain we keep using my patch until
an official solution is pushed in the valgrind project.

Cheers,
Romain

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

Reply via email to