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

Bruno Haible <br...@clisp.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |br...@clisp.org

--- Comment #2 from Bruno Haible <br...@clisp.org> ---
I'm still seeing this on Ubuntu 22.04, with valgrind 3.18.1.
===================== foo.c ========================
#include <stdlib.h>
#include <wchar.h>

int main ()
{
  wchar_t *s = (wchar_t *) malloc (8 * sizeof (wchar_t));
  s[0] = '-';
  s[1] = 'N';
  s[2] = 'A';
  s[3] = 'N';
  s[4] = ' ';
  s[5] = '3';
  s[6] = '3';
  s[7] = '\0';
  return wmemcmp (s + 1, L"NAN", 3) == 0;
}
===================================================
$ gcc -ggdb foo.c
$ valgrind ./a.out
==2109475== Memcheck, a memory error detector
==2109475== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2109475== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==2109475== Command: ./a.out
==2109475== 
==2109475== Invalid read of size 32
==2109475==    at 0x4A1C55D: __wmemcmp_avx2_movbe (memcmp-avx2-movbe.S:413)
==2109475==    by 0x10920D: main (foo.c:15)
==2109475==  Address 0x4aa6044 is 4 bytes inside a block of size 32 alloc'd
==2109475==    at 0x4848899: malloc (in
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==2109475==    by 0x10917E: main (foo.c:6)
==2109475== 
...

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

Reply via email to