On Tue, 28 Mar 2023 15:09:29 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
> A malformed unicode string containing only half of a surrogate pair (either a > high or low surrogate without the other half) will cause a native exception > in the macOS `NSPasteboardItem setString:forType:` method. This uncaught > exception will terminate (crash) the application. > > The fix is to validate the string before calling `setString:forType:`. I also > added a try / catch that logs a warning, so that if we ever run into other > exceptions, they won't be fatal. > > I added an automated test that fails on macOS without the fix and passes with > the fix. The test is run on other platforms as well, and passes both before > and after the fix. @andy-goryachev-oracle : can you be the second reviewer on this? ------------- PR Comment: https://git.openjdk.org/jfx/pull/1074#issuecomment-1497536324