Skip to content

8312186: TestStringEncodingFails for UTF-32#847

Closed
JornVernee wants to merge 2 commits intoopenjdk:foreign-memaccess+abifrom
JornVernee:UTF32
Closed

8312186: TestStringEncodingFails for UTF-32#847
JornVernee wants to merge 2 commits intoopenjdk:foreign-memaccess+abifrom
JornVernee:UTF32

Conversation

@JornVernee
Copy link
Member

@JornVernee JornVernee commented Jul 17, 2023

The test is failing because there are now several UTF 32-based char sets in StandardCharsets, and the FFM API can not handle these yet.

This patch adds support for the UTF 32 based char sets to MemorySegment::getString(long, Charset), MemorySegment::setString(long, String, Charset), and SegmentAllocator::allocateFrom(String, Charset).


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JDK-8312186: TestStringEncodingFails for UTF-32 (Bug - P2)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/panama-foreign.git pull/847/head:pull/847
$ git checkout pull/847

Update a local copy of the PR:
$ git checkout pull/847
$ git pull https://git.openjdk.org/panama-foreign.git pull/847/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 847

View PR using the GUI difftool:
$ git pr show -t 847

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/panama-foreign/pull/847.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 17, 2023

👋 Welcome back jvernee! A progress list of the required criteria for merging this PR into foreign-memaccess+abi will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@JornVernee JornVernee marked this pull request as ready for review July 17, 2023 20:25
@openjdk openjdk bot added the rfr Ready for review label Jul 17, 2023
private static String readFast_byte(MemorySegment segment, long offset, Charset charset) {
long len = strlen_byte(segment, offset);
byte[] bytes = new byte[(int)len];
MemorySegment.copy(segment, ValueLayout.JAVA_BYTE, offset, bytes, 0, (int)len);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I dropped the ValueLayout. prefix here and below to make the references to JAVA_BYTE consistent throughout the file.

@mlbridge
Copy link

mlbridge bot commented Jul 17, 2023

Webrevs

Copy link
Collaborator

@mcimadamore mcimadamore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@openjdk
Copy link

openjdk bot commented Jul 17, 2023

@JornVernee 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 details.

After integration, the commit message for the final commit will be:

8312186: TestStringEncodingFails for UTF-32

Reviewed-by: mcimadamore

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 no new commits pushed to the foreign-memaccess+abi branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the foreign-memaccess+abi branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Ready to be integrated label Jul 17, 2023
@JornVernee
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jul 17, 2023

Going to push as commit 7983194.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 17, 2023
@openjdk openjdk bot closed this Jul 17, 2023
@openjdk openjdk bot removed ready Ready to be integrated rfr Ready for review labels Jul 17, 2023
@openjdk
Copy link

openjdk bot commented Jul 17, 2023

@JornVernee Pushed as commit 7983194.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@JornVernee JornVernee deleted the UTF32 branch July 17, 2023 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants