New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8253590: java/foreign tests are still failing on x86_32 after foreign-memaccess integration #386
Conversation
…allocation size limits
👋 Welcome back mcimadamore! A progress list of the required criteria for merging this PR into |
@mcimadamore The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
@mcimadamore This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for more details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 4 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate |
@mcimadamore Since your change was applied there have been 11 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit ebf443a. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This patch addresses a problem in a couple of tests for the foreign memory access API; we have two methods in the API, namely
MemorySegment::asByteBuffer
andMemorySegment::toByteArray
which should throw an exception if invoked on a segment whose size is bigger than Integer.MAX_VALUE. The problem is that on 32-bits platform is not really possible to allocate a segment bigger than that; for that reason, at some point during 14 we "fixed" this by tweaking the test to allocate so much memory that the allocation itself would fail.When we integrated the latest API changes, this dubious fix was reverted, and now the tests have started misbehaving again. A much better solution is not to rely on allocation; the two tests should just create a synthetic segment using
MemorySegment::ofNativeRestricted
; this way we can test that the API throws when it should, w/o being impacted by what Unsafe does, or does not support on 32-bits platforms.Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/386/head:pull/386
$ git checkout pull/386