-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8263490: [macos] Crash occurs on JPasswordField with activated InputMethod #2959
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
Conversation
👋 Welcome back tnakamura! A progress list of the required criteria for merging this PR into |
@toshiona 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:
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 26 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dmarkov20, @mrserb, @azuev-java) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
As far as I understand the JPasswordField is affected because it disables InputMethods by default? I wonder why in this case we even try to run something in the native code? |
I agree that disabling IM completely on JPasswordField is the fundamental fix, but the current macOS can still activate the prediction candidate feature even if the target component doesn't accept non ASCII characters. Then, the feature may call native codes. I'd like to prevent crash this time. Also, the other IM related native codes in AWTView.m have similar checks, and only attributedSubstringForProposedRange lacks them. |
/integrate |
@dmarkov20 @mrserb @azuev-java |
/sponsor |
@dmarkov20 @toshiona Since your change was applied there have been 32 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 32c7fcc. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi,
Please review the fix for the issue of JPasswordField and activated InputMethod on macOS.
I don't think this condition is usual, but I'd like to avoid crash.
It needs two additional checks in "AWTView attributedSubstringForProposedRange:actualRange".
Tested test/jdk/java/awt on macOS Catalina and BigSur (both headful), and no regression was occurred.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2959/head:pull/2959
$ git checkout pull/2959