Bug 421570 - std_mutex fails on Arm v8.1 h/w
Summary: std_mutex fails on Arm v8.1 h/w
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: vex (other bugs)
Version First Reported In: 3.14.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-15 14:25 UTC by ahashmi
Modified: 2020-05-15 14:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Enable v8.1 atomics and fix SWP and LDUMAX instrs (1.49 KB, text/plain)
2020-05-15 14:32 UTC, ahashmi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ahashmi 2020-05-15 14:25:04 UTC
SUMMARY
The atomics test drd/tests/std_mutex hangs on Arm v8.1 h/w when built with GCC10.

STEPS TO REPRODUCE
1. make
2. make regtest

OBSERVED RESULT
std_mutex hangs


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 ahashmi 2020-05-15 14:32:50 UTC
Created attachment 128478 [details]
Enable v8.1 atomics and fix SWP and LDUMAX instrs
Comment 2 ahashmi 2020-05-15 14:36:32 UTC
Improved test coverage for the Arm v8.1 instructions will be added in a later patch.
Comment 3 Mark Wielaard 2020-05-15 14:41:50 UTC
Looks good. Just ran a make regtest on git master plus your patch:

== 630 tests, 12 stderr failures, 1 stdout failure, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls                    (stdoutB)
memcheck/tests/dw4                       (stderr)
memcheck/tests/leak_cpp_interior         (stderr)
memcheck/tests/supp_unknown              (stderr)
memcheck/tests/varinfo1                  (stderr)
memcheck/tests/varinfo2                  (stderr)
memcheck/tests/varinfo3                  (stderr)
memcheck/tests/varinfo4                  (stderr)
memcheck/tests/varinfo5                  (stderr)
memcheck/tests/varinfo6                  (stderr)
memcheck/tests/varinforestrict           (stderr)
memcheck/tests/vcpu_fnfns                (stdout)
helgrind/tests/hg05_race2                (stderr)
helgrind/tests/tc20_verifywrap           (stderr)

Which is expected on arm64. Most come from slightly "wrong" backtraces.
Comment 4 Mark Wielaard 2020-05-15 14:54:49 UTC
commit 6052ee66a0cf5234e8e2a2b49a8760226bc13b92
Author: Assad Hashmi <assad.hashmi@linaro.org>
Date:   Fri May 15 16:44:14 2020 +0200

    Enable v8.1 atomics and fix SWP and LDUMAX instructions.
    
    The atomics test drd/tests/std_mutex hangs on Arm v8.1 when built
    with GCC10. Add HWCAP_ATOMICS to ARM64_SUPPORTED_HWCAP and fix the
    ldumax and swp instructions to make it work.
    
    https://bugs.kde.org/show_bug.cgi?id=421570