https://bugs.kde.org/show_bug.cgi?id=397083
Bug ID: 397083
Summary: Likely false positive "uninitialised value(s)" for
__wmemchr_avx2 and __wmemcmp_avx2_movbe
Product: valgrind
Version: 3.13.0
Platform: Ubuntu Packages
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: memcheck
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 114264
--> https://bugs.kde.org/attachment.cgi?id=114264&action=edit
source code to reproduce error
A C++ code like
wstring w = L"x";
size_t p = w.find(w);
causes valgrind to output warnings:
Conditional jump or move depends on uninitialised value(s)
at 0x55588F7: __wmemchr_avx2 (memchr-avx2.S:250)
Use of uninitialised value of size 8
at 0x55584C2: __wmemcmp_avx2_movbe (memcmp-avx2-movbe.S:171)
I found the similar (but not identical) bug report #307828.
Some one here says it's the fault of valgrind, not the c++ standard library:
https://sourceware.org/bugzilla/show_bug.cgi?id=22954
I'm not fit enough in assembler to judge whether boundary checks are performed
correctly or if indeed too much memory is read (in order to do avx2 instruction
with many bytes at once?).
Under Ubuntu, I have libstdc++6:amd64 version 7.2.0-8ubuntu3.2, "GNU Standard
C++ Library v3".
Steps to reproduce:
Find attached testw.cpp
g++ notused/testw.cpp -o testw && valgrind ./testw
Notice how for some string lengths no error is reported.
--
You are receiving this mail because:
You are watching all bug changes.