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

            Bug ID: 475652
           Summary: Missing suppression for __wcsncpy_avx2
                    (strncpy-avx2.S:308)?
    Classification: Developer tools
           Product: valgrind
           Version: 3.22 GIT
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: s...@gentoo.org
  Target Milestone: ---

SUMMARY

Invalid read found in __wcsncpy_avx2 (strncpy-avx2.S:308) when running Python
software, may need a suppression as it's from glibc.

STEPS TO REPRODUCE
1.  Run 'valgrind --trace-children=yes emerge -pvO bash' on a Gentoo Linux
system
2. I suspect that it's related to a recent change in Gentoo where we allowed
glibc's autodetection of x86 ISA for runtime loading

OBSERVED RESULT

```
$ valgrind --trace-children=yes emerge -pvO bash
==1273477== Memcheck, a memory error detector
==1273477== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==1273477== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info
==1273477== Command: /usr/bin/emerge -pvO bash
==1273477==
==1273477== Memcheck, a memory error detector
==1273477== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==1273477== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info
==1273477== Command: /usr/lib/python-exec/python3.12/emerge -pvO bash
==1273477==
==1273477== Invalid read of size 32
==1273477==    at 0x5038C93: __wcsncpy_avx2 (strncpy-avx2.S:308)
==1273477==    by 0x4B209F3: UnknownInlinedFun (wchar2.h:81)
==1273477==    by 0x4B209F3: _Py_wrealpath (fileutils.c:2130)
==1273477==    by 0x4B18540: _PyPathConfig_ComputeSysPath0.constprop.0
(pathconfig.c:495)
==1273477==    by 0x4B17D6C: UnknownInlinedFun (main.c:584)
==1273477==    by 0x4B17D6C: Py_RunMain (main.c:689)
==1273477==    by 0x4AD59FB: Py_BytesMain (main.c:743)
==1273477==    by 0x4F05346: (below main) (libc_start_call_main.h:58)
==1273477==  Address 0x5581be0 is 20 bytes after a block of size 156 alloc'd
==1273477==    at 0x4840958: malloc (vg_replace_malloc.c:431)
==1273477==    by 0x4AD7116: decode_current_locale (fileutils.c:482)
==1273477==    by 0x4AD5988: Py_DecodeLocale (fileutils.c:664)
==1273477==    by 0x4B209CE: _Py_wrealpath (fileutils.c:2119)
==1273477==    by 0x4B18540: _PyPathConfig_ComputeSysPath0.constprop.0
(pathconfig.c:495)
==1273477==    by 0x4B17D6C: UnknownInlinedFun (main.c:584)
==1273477==    by 0x4B17D6C: Py_RunMain (main.c:689)
==1273477==    by 0x4AD59FB: Py_BytesMain (main.c:743)
==1273477==    by 0x4F05346: (below main) (libc_start_call_main.h:58)
==1273477==
--1273477-- WARNING: unhandled amd64-linux syscall: 441
--1273477-- You may be able to write your own handler.
--1273477-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--1273477-- Nevertheless we consider this a bug.  Please report
--1273477-- it at http://valgrind.org/support/bug_reports.html.
^C
```

EXPECTED RESULT

No invalid reads.

SOFTWARE/OS VERSIONS
Reproduced on Valgrind 3.21.0 and git master as of a few days ago.

ADDITIONAL INFORMATION

I'm going to try get a reproducer that doesn't involve a large Python program
but no promises.

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

Reply via email to