RFR: 8374341: Use of "\s" instead of "\\s" in CoreUtils.java results in splitting on backspace instead of whitespace [v4]
Chris Plummer
cjplummer at openjdk.org
Wed Jan 14 18:56:13 UTC 2026
On Wed, 7 Jan 2026 12:48:29 GMT, Eunbin Son <duke at openjdk.org> wrote:
>> ### Summary
>> Fix incorrect regex usage in CoreUtils.getCoreFileLocation.
>>
>> ### Description
>> CoreUtils.getCoreFileLocation uses String.split("\s", 2).
>> The string literal "\s" represents a backspace character, not a whitespace regex.
>> As a result, the split operation does not separate fields on whitespace.
>> This change replaces the pattern with `"\\s+"` to correctly split on whitespace.
>> No other logic is modified.
>>
>> ### Bug ID : JDK-8374341
>> https://bugs.java.com/bugdatabase/view_bug?bug_id=8374341
>
> Eunbin Son has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>
> JDK-8374341: Remove unverified systemd-coredump handling code
Marked as reviewed by cjplummer (Reviewer).
There certainly can be multiple crashes around the same time given that we run the SA core file tests in parallel, so seems there are multiple issues with this support. I guess the best thing to do at this point is to remove it. I'll file a separate CR to deal with checking if the core file was zipped and try to unzip it. I'll references this CR as having removed some code that might be useful (waiting for the zipping to complete).
-------------
PR Review: https://git.openjdk.org/jdk/pull/28984#pullrequestreview-3662277660
PR Comment: https://git.openjdk.org/jdk/pull/28984#issuecomment-3751095041
More information about the serviceability-dev
mailing list