Re: RFR: 8308992: New test TestHFA fails with zero
On Tue, 30 May 2023 12:17:00 GMT, Jorn Vernee wrote: > The issue is that the fallback linker uses `copyFrom` when copying a by-value > struct argument to an internal buffer, without first adjusting the size of > the argument segment. This means that if the argument segment is 'too large' > (i.e. larger than the layout it was linked with) we fail with an exception > since the internal buffer is too small for the entire argument segment to be > copied into. > > The fix is simply to use an exactly-sized copy instead, just like we do in > other linker implementations. (The argument segment being too large is fine, > all we care about is that it's large enough). > > Testing: jdk-tier5 Marked as reviewed by mcimadamore (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14215#pullrequestreview-1451127172
RFR: 8308992: New test TestHFA fails with zero
The issue is that the fallback linker uses `copyFrom` when copying a by-value struct argument to an internal buffer, without first adjusting the size of the argument segment. This means that if the argument segment is 'too large' (i.e. larger than the layout it was linked with) we fail with an exception since the internal buffer is too small for the entire argument segment to be copied into. The fix is simply to use an exactly-sized copy instead, just like we do in other linker implementations. (The argument segment being too large is fine, all we care about is that it's large enough). Testing: jdk-tier5 - Commit messages: - Use exactly-sized copy in fallback linker for by-value structs Changes: https://git.openjdk.org/jdk/pull/14215/files Webrev: https://webrevs.openjdk.org/?repo=jdk=14215=00 Issue: https://bugs.openjdk.org/browse/JDK-8308992 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/14215.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14215/head:pull/14215 PR: https://git.openjdk.org/jdk/pull/14215