https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86311

            Bug ID: 86311
           Summary: gcc_qsort calls memcpy with overlaps
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
                CC: amonakov at gcc dot gnu.org
  Target Milestone: ---

valgrind reports:

==5787== Source and destination overlap in memcpy(0x6448b30, 0x6448b30, 8)
==5787==    at 0x4C2DCFC: memcpy@@GLIBC_2.14 (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==5787==    by 0x1D8F9FC: reorder45(sort_ctx*, char*, char*, char*, char*,
char*) (sort.cc:112)
==5787==    by 0x1D90181: netsort(char*, sort_ctx*) (sort.cc:172)
==5787==    by 0x1D901EF: mergesort(char*, sort_ctx*, unsigned long, char*,
char*) (sort.cc:185)
==5787==    by 0x1D90667: gcc_qsort(void*, unsigned long, unsigned long, int
(*)(void const*, void const*)) (sort.cc:229)
==5787==    by 0x1D53B84: qsort_chk(void*, unsigned long, unsigned long, int
(*)(void const*, void const*)) (vec.c:218)
==5787==    by 0x10E97F2: prune_unused_phi_nodes(bitmap_head*, bitmap_head*,
bitmap_head*) (tree-into-ssa.c:811)
==5787==    by 0x10E9E73: insert_phi_nodes_for(tree_node*, bitmap_head*, bool)
(tree-into-ssa.c:981)
...

Reply via email to