RFR: 8336529: [arm32, Ubuntu noble] sun.nio.fs.UnixFileAttributeViews setTimes() fail
Vladimir Petko
vpetko at openjdk.org
Wed Jul 17 04:03:04 UTC 2024
time_t transition in Debian/Ubuntu left 32 bit time_t symbols in glibc.
Looking up 'futimens' via dlsym returns 32 bit version of the function.
This is causing failure to set last modified time (e.g. instead of year 2017 we get 1976 in the test).
Using the function directly correctly calls 64 bit versions.
When we lookup functions with time_t arguments through dlsym() calls we should use 64 bit versions.
This MR adds a function to lookup 64 bit functions when time_t size is greater than 32 bit in line with the existing [time_t patch](https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=alioth/openjdk-8.git;a=blob;f=debian/patches/t64-dlsyms.diff;h=b2cc8f8a00244bc44900366ed08d7f246ad09904;hb=4c5085cd49fcdc04405e9039705935fde08644a7)
Testing:
`` sh configure --with-debug-level=fastdebug --enable-fallback-linker --with-jtreg=../jtreg/build/images/jtreg``
==============================
Test summary
==============================
TEST TOTAL PASS FAIL ERROR
jtreg:test/jdk/jdk/nio/zipfs/CopyMoveTests.java 1 1 0 0
jtreg:test/jdk/jdk/nio/zipfs/TestPosix.java 1 1 0 0
jtreg:test/jdk/java/nio/file/attribute/BasicFileAttributeView/Basic.java
1 1 0 0
jtreg:test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java
1 1 0 0
jtreg:test/jdk/java/nio/file/Files/SetLastModifiedTime.java
1 1 0 0
jtreg:test/jdk/java/nio/file/Files/SymlinkTime.java
1 1 0 0
jtreg:test/langtools/tools/javac/modules/MOptionTest.java
1 1 0 0
jtreg:test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicSharedSymbols.java
1 1 0 0
jtreg:test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestDynamicDump.java
1 1 0 0
jtreg:test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java
1 1 0 0
jtreg:test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestStaticDump.java
1 1 0 0
jtreg:test/hotspot/jtreg/runtime/cds/appcds/RelativePath.java
1 1 0 0
jtreg:test/hotspot/jtreg/runtime/jcmd/JcmdCmdLine.java
1 1 0 0
jtreg:test/hotspot/jtreg/serviceability/attach/AttachNegativePidTest.java
1 1 0 0
jtreg:test/hotspot/jtreg/serviceability/attach/RemovingUnixDomainSocketTest.java
1 1 0 0
jtreg:test/hotspot/jtreg/serviceability/HeapDump/DuplicateArrayClassesTest.java
1 1 0 0
jtreg:test/hotspot/jtreg/serviceability/HeapDump/FieldsInInstanceTest.java
1 1 0 0
jtreg:test/hotspot/jtreg/serviceability/attach/ConcAttachTest.java
0 0 0 0
==============================
TEST SUCCESS
Finished building target 'test' in configuration 'linux-arm-server-fastdebug'
-------------
Commit messages:
- typo: remove extra whitespace
- fix typo: missing whitespace
- try to use 64 bit function if sizeof(time_t) > 4
Changes: https://git.openjdk.org/jdk/pull/20208/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20208&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8336529
Stats: 20 lines in 1 file changed: 17 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/20208.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20208/head:pull/20208
PR: https://git.openjdk.org/jdk/pull/20208
More information about the nio-dev
mailing list