Bug 463456 - memcheck/tests/origin6-fp fails when building for x86-64-v3 target
Summary: memcheck/tests/origin6-fp fails when building for x86-64-v3 target
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.20.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-25 14:19 UTC by Alexander Kanavin
Modified: 2024-04-12 14:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kanavin 2022-12-25 14:19:14 UTC
Yocto project is transitioning x86_64 builds to build for x86-64-v3 (e.g. enabling AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE), and one of the regressions is in memcheck/tests/origin6-fp.

Specifically:

Correct output for  x86-64-v2:

root@qemux86-64:~/origin6-test# gcc -march=x86-64-v2 -g -O origin6-fp.c 
root@qemux86-64:~/origin6-test# valgrind   -q --track-origins=yes ./a.out 
==19942== Conditional jump or move depends on uninitialised value(s)
==19942==    at 0x1094A0: main (origin6-fp.c:97)
==19942==  Uninitialised value was created by a client request
==19942==    at 0x109409: setup_arr (origin6-fp.c:75)
==19942==    by 0x109467: main (origin6-fp.c:87)
==19942== 
Test succeeded.

Incorrect output for v3 (missing the uninitialized value bit):

root@qemux86-64:~/origin6-test# gcc -march=x86-64-v3 -g -O origin6-fp.c 
root@qemux86-64:~/origin6-test# valgrind   -q --track-origins=yes ./a.out 
==19948== Conditional jump or move depends on uninitialised value(s)
==19948==    at 0x1094A0: main (origin6-fp.c:97)
==19948== 
Test succeeded.

The more detailed information about the levels is here:
https://www.phoronix.com/news/GCC-11-x86-64-Feature-Levels
Comment 1 Mark Wielaard 2024-04-12 14:42:13 UTC
Confirmed. With gcc -march=x86-64-v3 memcheck is unable to track the origin. Even when build with -O0 (instead of -O).