Skip to content
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

tzmappings format has changed, breaking native-image timezone support in JDK 16 #3366

Closed
shoaniki opened this issue Apr 20, 2021 · 0 comments · Fixed by #3368
Closed

tzmappings format has changed, breaking native-image timezone support in JDK 16 #3366

shoaniki opened this issue Apr 20, 2021 · 0 comments · Fixed by #3368
Assignees
Milestone

Comments

@shoaniki
Copy link

Describe the issue
The tzmappings file used to convert Windows timezone names to Java has changed format slightly, dropping an obsolete field. SVM includes a copy of the old code in order to read the file from memory instead of disk, but the experimental JDK 16 builds use this to parse the new file, with the result that it invariably reports "Illegal format in tzmappings file: illegal null character found at line 1, offset 47" instead of converting time zones.

Steps to reproduce the issue
Please include both build steps as well as run steps

  1. Install a JDK 16 build of GraalVM 21.1.0 on Windows
  2. Run the pre-packaged gu (or any other native-image binary that causes time zones to be looked up)

Describe GraalVM and your environment:

  • GraalVM version: 21.1.0
  • JDK major version: 16
  • OS: Windows 10
  • Architecture: AMD64

More details
The problematic code is in substratevm/src/com.oracle.svm.native.libchelper/src/timeZone.c.
It's pretty straightforward -- there used to be four fields per line and now there are three :)

(While debugging this problem I also became suspicious that SVM_readBufferUntilNewLine looks like it's skipping an extra byte before writing the null terminator -- I discovered the real cause before digging too far but it might be worth someone checking that out.)

@pejovica pejovica self-assigned this Apr 21, 2021
@pejovica pejovica added this to To do in Native Image via automation Apr 21, 2021
@pejovica pejovica moved this from To do to In progress in Native Image Apr 21, 2021
Native Image automation moved this from In progress to Done Apr 22, 2021
@pejovica pejovica added this to the 21.2 milestone Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Native Image
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants