RFR: 8299580: RISC-V: fail to build with GCC 12 due to stringop-overflow warning
Fei Yang
fyang at openjdk.org
Fri Jan 6 03:12:34 UTC 2023
Release fail to build with GCC-12 due to warnings been treated as errors. But the mentioned HotSpot code looks fine, so this looks to me like a GCC-12 suprious warning. This issue does not menifest on other platforms because they are using inline assembly code instead of calling GCC builtins like __atomic_add_fetch to implement class atomic.
Currently, class atomic is only partially implemented with inline assembly code on RISC-V. Instead of disabling the stringop-overflow warning when building HotSpot, I would prefer reimplementing other functions of class atomic using inline assembly code. That way has the extra benefit of providing us fine-grained control on code generation for these atomics. This is the first version which maps to the original implementation with GCC builtins. I will further improve this part distinguishing different memory ordering requirements.
Testing:
- [x] release and fastdebug build fine with both GCC-11 and GCC-12.
- [x] run tier1-3 tests on HiFive Unmatched.
- [x] run non-trivial benchmark workloads like: renaissance, specjvm2008, specjbb2015, etc.
-------------
Commit messages:
- 8299580: RISC-V: fail to build with GCC 12 due to stringop-overflow warning
Changes: https://git.openjdk.org/jdk/pull/11858/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11858&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8299580
Stats: 180 lines in 1 file changed: 145 ins; 5 del; 30 mod
Patch: https://git.openjdk.org/jdk/pull/11858.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11858/head:pull/11858
PR: https://git.openjdk.org/jdk/pull/11858
More information about the hotspot-runtime-dev
mailing list