https://sourceware.org/bugzilla/show_bug.cgi?id=22954

            Bug ID: 22954
           Summary: Conditional jump or move depends on uninitialised
                    value(s) in at 0x519BD27: __wmemchr_avx2
                    (memchr-avx2.S:260)
           Product: binutils
           Version: 2.31 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: mliska at suse dot cz
  Target Milestone: ---

Hello.

With current thunk I see:

$ valgrind --leak-check=yes --trace-children=yes ~/bin/binutils/bin/ld
--eh-frame-hdr -m elf_x86_64
...
==21255== Conditional jump or move depends on uninitialised value(s)
==21255==    at 0x519BD27: __wmemchr_avx2 (memchr-avx2.S:260)
==21255==    by 0x510A579: internal_fnwmatch (fnmatch_loop.c:168)
==21255==    by 0x510D5D7: fnmatch@@GLIBC_2.2.5 (fnmatch.c:433)
==21255==    by 0x447DC8: find_target (targets.c:1590)
==21255==    by 0x447EB8: bfd_set_default_target (targets.c:1624)
==21255==    by 0x40348E: main (ldmain.c:246)
...

When I put there a printf:

diff --git a/bfd/targets.c b/bfd/targets.c
index 43102d428b..7765c9ec53 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -1586,6 +1586,7 @@ find_target (const char *name)
      config.sub first, but that is hard.  */
   for (match = &bfd_target_match[0]; match->triplet != NULL; match++)
     {
+      fprintf (stderr, "pattern: %s, name: %s\n", match->triplet, name);
       if (fnmatch (match->triplet, name, 0) == 0)
        {
          while (match->vector == NULL)

I see:
...
pattern: i[3-7]86-*-linux-*, name: x86_64-pc-linux-gnu
pattern: i[3-7]86-*-redox*, name: x86_64-pc-linux-gnu
pattern: x86_64-*-dicos*, name: x86_64-pc-linux-gnu
==21255== Conditional jump or move depends on uninitialised value(s)
==21255==    at 0x519BD27: __wmemchr_avx2 (memchr-avx2.S:260)
==21255==    by 0x510A579: internal_fnwmatch (fnmatch_loop.c:168)
==21255==    by 0x510D5D7: fnmatch@@GLIBC_2.2.5 (fnmatch.c:433)
==21255==    by 0x447DC8: find_target (targets.c:1590)
==21255==    by 0x447EB8: bfd_set_default_target (targets.c:1624)
==21255==    by 0x40348E: main (ldmain.c:246)
==21255== 
pattern: x86_64-*-elf*, name: x86_64-pc-linux-gnu
pattern: x86_64-*-rtems*, name: x86_64-pc-linux-gnu
pattern: x86_64-*-fuchsia, name: x86_64-pc-linux-gnu
pattern: x86_64-*-dragonfly*, name: x86_64-pc-linux-gnu
...

Maybe it's an issue of glibc, maybe valgrind can't handle that properly?
Thanks

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to