RFR: 8348323: Corrupted timezone string in JVM crash log [v2]

Kevin Walls kevinw at openjdk.org
Tue Jan 28 10:00:58 UTC 2025


On Fri, 24 Jan 2025 20:51:41 GMT, Dhamoder Nalla <dhanalla at openjdk.org> wrote:

>> Add a error check to "wcstombs" otherwise the "buf" prints junk or corrupted string.
>> 
>> Test performed: 
>> 1. "jcmd < jvm pid > VM.info" for different JVM versions
>
> Dhamoder Nalla has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Merge branch 'master' into Corrupted-Timezone-String
>  - update year in copyright header
>  - Fix to Timezone string corruption

Hi,
Would it be OK to proceed with this as it stands?

I understand the idea of showing the error message.  Concerned that printed in-line it makes the line very long, may obscure the elapsed time in some situations.  This hs_err line may be parsed by tools, so adding a free form error message may be harder to parse than no timezone.

Not printing a timezone will mean we couldn't decode one.

The case I noted in JDK-8340465 was that setting a TZ variable may contain something that wasn't recognised in Windows.  That's why I asked if we knew what TZ was in the case here.

There might be more to do here in another change, but it wasn't clear if we can ignore TZ, and use the Windows api only, or if that creates other problems.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23246#issuecomment-2618498836


More information about the hotspot-runtime-dev mailing list