RFR: 8253155: Minor cleanups and Javadoc fixes for LdapDnsProvider of java.naming

2020-09-15 Thread Christoph Langer
There are some little flaws in LdapDNSProvider and auxilliary classes, mostly in Javadoc. In detail: src/java.naming/share/classes/com/sun/jndi/ldap/DefaultLdapDnsProvider.java: Unnecessary import src/java.naming/share/classes/com/sun/jndi/ldap/LdapDnsProviderService.java: typo

Integrated: 8253155: Minor cleanups and Javadoc fixes for LdapDnsProvider of java.naming

2020-09-15 Thread Christoph Langer
On Tue, 15 Sep 2020 07:47:54 GMT, Christoph Langer wrote: > There are some little flaws in LdapDNSProvider and auxilliary classes, mostly > in Javadoc. > > In detail: > src/java.naming/share/classes/com/sun/jndi/ldap/DefaultLdapDnsProvider.java: > Unnecessary import >

Re: RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources

2020-11-27 Thread Christoph Langer
On Sat, 21 Nov 2020 23:21:15 GMT, Christoph Langer wrote: >> There is a flaw in sun.security.ssl.SSLSocketImpl::close() which leads to >> leaking socket resources after JDK-8224829. >> >> The close method calls duplexCloseOutput() and duplexCloseInput(). In case &

RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources

2020-11-21 Thread Christoph Langer
There is a flaw in sun.security.ssl.SSLSocketImpl::close() which leads to leaking socket resources after JDK-8224829. The close method calls duplexCloseOutput() and duplexCloseInput(). In case of an exception in any of these methods, the call to closeSocket() is bypassed, and the underlying

Re: RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources

2020-11-21 Thread Christoph Langer
On Sat, 21 Nov 2020 08:32:17 GMT, Christoph Langer wrote: > There is a flaw in sun.security.ssl.SSLSocketImpl::close() which leads to > leaking socket resources after JDK-8224829. > > The close method calls duplexCloseOutput() and duplexCloseInput(). In case of > an e

Integrated: 8256818: SSLSocket that is never bound or connected leaks socket resources

2020-12-02 Thread Christoph Langer
On Sat, 21 Nov 2020 08:32:17 GMT, Christoph Langer wrote: > There is a flaw in sun.security.ssl.SSLSocketImpl::close() which leads to > leaking socket resources after JDK-8224829. > > The close method calls duplexCloseOutput() and duplexCloseInput(). In case of > an e

Re: RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources [v3]

2020-12-02 Thread Christoph Langer
On Wed, 2 Dec 2020 18:01:04 GMT, Xue-Lei Andrew Fan wrote: >> Christoph Langer has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Small test improvement > > test/jdk/sun/security/ssl/SSLSocketImpl/SSLSoc

RFR: 8256427: Test com/sun/jndi/dns/ConfigTests/PortUnreachable.java does not work on AIX

2020-11-16 Thread Christoph Langer
The test com/sun/jndi/dns/ConfigTests/PortUnreachable.java is not working on AIX. It tests that when a DNS server is unreachable it fails quickly with a PortUnreachableException due to ICMP Destination Unreachable packets received and not having to wait for the full timeout interval.

Re: RFR: 8256427: Test com/sun/jndi/dns/ConfigTests/PortUnreachable.java does not work on AIX [v2]

2020-11-18 Thread Christoph Langer
On Wed, 18 Nov 2020 07:46:33 GMT, Matthias Baesken wrote: >> Christoph Langer has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains one commit: >> >> Test jdk/com/sun/jndi/dns/ConfigTests/PortUnreachable.java

Integrated: 8256427: Test com/sun/jndi/dns/ConfigTests/PortUnreachable.java does not work on AIX

2020-11-18 Thread Christoph Langer
On Mon, 16 Nov 2020 22:28:08 GMT, Christoph Langer wrote: > The test com/sun/jndi/dns/ConfigTests/PortUnreachable.java is not working on > AIX. > > It tests that when a DNS server is unreachable it fails quickly with a > PortUnreachableException due to ICMP Destination Unre

Re: RFR: 8256427: Test com/sun/jndi/dns/ConfigTests/PortUnreachable.java does not work on AIX [v2]

2020-11-16 Thread Christoph Langer
On Tue, 17 Nov 2020 03:33:58 GMT, Jie Fu wrote: >> Christoph Langer has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains one commit: >> >> Test jdk/com/sun/jndi/dns/ConfigTests/PortUnreachable.java does not

Re: RFR: 8256427: Test com/sun/jndi/dns/ConfigTests/PortUnreachable.java does not work on AIX [v2]

2020-11-16 Thread Christoph Langer
rivate > exclude list for AIX. I suggest this test update to be the final solution. Christoph Langer has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: Test jdk/com/sun/jndi/dns/ConfigTests/PortUnreachable.java does not

Re: RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources [v2]

2020-11-22 Thread Christoph Langer
; > Secondly, I'm proposing to improve exception handling a bit. So in case > there's an IOException on the path of duplexClose, it is caught and logged. > But the real close moves to the finally block since it should be done > unconditionally. Christoph Langer has updated the p

Re: RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources [v3]

2020-11-22 Thread Christoph Langer
; > Secondly, I'm proposing to improve exception handling a bit. So in case > there's an IOException on the path of duplexClose, it is caught and logged. > But the real close moves to the finally block since it should be done > unconditionally. Christoph Langer has updated the pull r

Re: RFR: JDK-8266918: merge_stack in check_code.c add NULL check [v2]

2021-06-04 Thread Christoph Langer
On Fri, 4 Jun 2021 14:10:20 GMT, Matthias Baesken wrote: >> Hello, please review this small Sonar finding. >> Sonar reports a potential NULL pointer dereference here : >> https://sonarcloud.io/project/issues?id=shipilev_jdk=c=AXck8CPLBBG2CXpcnh_z=false=MAJOR=BUG >> "Access to field 'item'

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile

2021-02-08 Thread Christoph Langer
On Fri, 5 Feb 2021 15:23:59 GMT, Matthias Baesken wrote: > Hello, > Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a > related finally clause or try with resources. That should better be changed. > See also the Sonar check result : > >

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile

2021-02-08 Thread Christoph Langer
On Mon, 8 Feb 2021 13:41:17 GMT, Alan Bateman wrote: >> Hello, >> Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a >> related finally clause or try with resources. That should better be changed. >> See also the Sonar check result : >> >>

Re: RFR: JDK-8261237: remove isClassPathAttributePresent method [v2]

2021-02-09 Thread Christoph Langer
On Tue, 9 Feb 2021 08:30:54 GMT, Matthias Baesken wrote: >> Hello, >> Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a >> related finally clause or try with resources. That should better be changed. >> See also the Sonar check result : >> >>

Re: RFR: JDK-8262199: issue in jli args.c [v3]

2021-02-25 Thread Christoph Langer
On Thu, 25 Feb 2021 15:40:00 GMT, Matthias Baesken wrote: >> Sonar reports a finding in args.c, where a file check is done . >> Stat performs a check on file, and later fopen is called on the file . >> >> The coding could be slightly rewritten so that the potential issue is >> removed (however

Re: RFR: JDK-8262199: issue in jli args.c [v3]

2021-02-25 Thread Christoph Langer
On Thu, 25 Feb 2021 16:39:25 GMT, Matthias Baesken wrote: >> src/java.base/share/native/libjli/args.c line 378: >> >>> 376: if (st.st_size > MAX_ARGF_SIZE) { >>> 377: JLI_ReportMessage(CFG_ERROR10, MAX_ARGF_SIZE); >>> 378: reportAndExit(NULL, NULL); >> >> This

Re: RFR: JDK-8262199: issue in jli args.c [v5]

2021-02-26 Thread Christoph Langer
On Fri, 26 Feb 2021 08:31:00 GMT, Matthias Baesken wrote: >> Sonar reports a finding in args.c, where a file check is done . >> Stat performs a check on file, and later fopen is called on the file . >> >> The coding could be slightly rewritten so that the potential issue is >> removed (however

Re: RFR: JDK-8262199: TOCTOU in jli args.c

2021-02-23 Thread Christoph Langer
On Tue, 23 Feb 2021 13:58:03 GMT, Matthias Baesken wrote: > Sonar reports a finding in args.c, where a file check is done . > Stat performs a check on file, and later fopen is called on the file : > https://sonarcloud.io/project/issues?id=shipilev_jdk=c=AXck8CL0BBG2CXpcnhtM=false=VULNERABILITY >

Re: RFR: JDK-8262199: TOCTOU in jli args.c [v2]

2021-02-23 Thread Christoph Langer
On Tue, 23 Feb 2021 14:23:59 GMT, Matthias Baesken wrote: > > This looks good in general. Do you know whether there's a jtreg test that > > stresses arg files? > > There are tests dealing with args files at test/jdk/tools/launcher/ , e.g. > there is test/jdk/tools/launcher/ArgsFileTest.java .

Re: RFR: JDK-8262199: TOCTOU in jli args.c [v2]

2021-02-23 Thread Christoph Langer
On Tue, 23 Feb 2021 14:30:17 GMT, Matthias Baesken wrote: >> Sonar reports a finding in args.c, where a file check is done . >> Stat performs a check on file, and later fopen is called on the file : >>

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-12 Thread Christoph Langer
On Tue, 9 Feb 2021 14:33:22 GMT, Matthias Baesken wrote: > JDK-8261422: Adjust problematic String.format calls in > jdk/internal/util/Preconditions.java outOfBoundsMessage As we're potentially formatting any "Number" type here, theoretically floats could be passed which would result in an

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702 [v3]

2021-02-16 Thread Christoph Langer
This is a proposal to relax the test and throw a SkippedException in such > cases. Christoph Langer has updated the pull request incrementally with one additional commit since the last revision: Update copyright year - Changes: - all: https://git.openjdk.java.net/jdk/

Integrated: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

2021-02-16 Thread Christoph Langer
On Mon, 15 Feb 2021 13:27:36 GMT, Christoph Langer wrote: > After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java > still fails on BigSur versions that have a patch version (> 1), e.g. on macOS > Big Sur 11.2.1, and where the JDK was built wit

RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

2021-02-15 Thread Christoph Langer
After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java still fails on BigSur versions that have a patch version (> 1), e.g. on macOS Big Sur 11.2.1, and where the JDK was built with xcode < 12. java.lang.Error: 11.2 != 11.2.1 This is a proposal to relax the test and throw

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

2021-02-15 Thread Christoph Langer
On Mon, 15 Feb 2021 13:27:36 GMT, Christoph Langer wrote: > After the fix for JDK-8253702, the test java/lang/System/OsVersionTest.java > still fails on BigSur versions that have a patch version (> 1), e.g. on macOS > Big Sur 11.2.1, and where the JDK was built wit

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702

2021-02-15 Thread Christoph Langer
On Mon, 15 Feb 2021 14:06:31 GMT, Roger Riggs wrote: > Given the lack of veracity from the os... > Perhaps check that `swVersion.startsWith(osVersion) == true` (if the whole > string doesn't match). > > I'm hopeful that when JDK 17 is released the toolchain has been upgraded and > this patch

Re: RFR: 8253702: BigSur version number reported as 10.16, should be 11.nn [v3]

2021-02-15 Thread Christoph Langer
On Thu, 11 Feb 2021 19:30:02 GMT, Kevin Rushforth wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> optimize case of 10.16 and SYSTEM_VERSION_COMPAT is set > > Looks good. Thanks for the fix! This is probably the

Re: RFR: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702 [v2]

2021-02-15 Thread Christoph Langer
This is a proposal to relax the test and throw a SkippedException in such > cases. Christoph Langer has updated the pull request incrementally with one additional commit since the last revision: Simplify the coding, use startsWith comparison - Changes: - all: https://git.openjd

Integrated: 8262018: Wrong format in SAP copyright header of OsVersionTest

2021-02-19 Thread Christoph Langer
On Fri, 19 Feb 2021 10:35:21 GMT, Christoph Langer wrote: > The fix for JDK-8261753 introduced a ',' after the copyright years which is > not the expected format for SAP copyrights. This pull request has now been integrated. Changeset: efbaedeb Author:Christoph Langer URL:

RFR: 8262018: Wrong format in SAP copyright header of OsVersionTest

2021-02-19 Thread Christoph Langer
The fix for JDK-8261753 introduced a ',' after the copyright years which is not the expected format for SAP copyrights. - Commit messages: - JDK-8262018 Changes: https://git.openjdk.java.net/jdk/pull/2642/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=2642=00 Issue:

Re: RFR: 8247980: Exclusive execution of java/util/stream tests slows down tier1

2021-08-24 Thread Christoph Langer
On Thu, 19 Aug 2021 15:15:31 GMT, Aleksey Shipilev wrote: > See the bug report for more details. I would appreciate if people with their > corporate testing systems would run this through their systems to avoid > surprises. (ping @RealCLanger, @iignatev). I have added this to our internal

Re: RFR: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0 [v2]

2021-09-23 Thread Christoph Langer
On Wed, 22 Sep 2021 17:41:18 GMT, Roger Riggs wrote: >> The Mac OS specific code to determine the os.version property in >> java_props_macosx.c is updated >> to replace the code extracting the version from the SystemVersion.plist by >> reading the version using t\ >> he hidden link: > > Roger

Re: RFR: JDK-8274840: Update OS detection code to recognize Windows 11

2021-10-07 Thread Christoph Langer
On Thu, 7 Oct 2021 11:20:57 GMT, Matthias Baesken wrote: > The OS detection code of the JDK/JVM should recognize the new Windows 11. For > details see : > > https://docs.microsoft.com/en-us/windows/release-health/windows11-release-information > OS build number is : 22000.194 for 21H2 (original

Re: RFR: 8253702: BigSur version number reported as 10.16, should be 11.nn [v3]

2021-09-24 Thread Christoph Langer
On Thu, 11 Feb 2021 19:23:55 GMT, Roger Riggs wrote: >> On Mac Os X, the OSVersionTest detected a difference in the version number >> reported in the os.version property >> and the version number provided by `sw_vers -productVersion`. >> >> When the java runtime is built with XCode 11.3, the

Re: RFR: 8253702: BigSur version number reported as 10.16, should be 11.nn [v3]

2021-09-24 Thread Christoph Langer
On Thu, 11 Feb 2021 19:23:55 GMT, Roger Riggs wrote: >> On Mac Os X, the OSVersionTest detected a difference in the version number >> reported in the os.version property >> and the version number provided by `sw_vers -productVersion`. >> >> When the java runtime is built with XCode 11.3, the

Re: RFR: 8276216: Negated character classes performance regression in Pattern

2021-11-19 Thread Christoph Langer
On Wed, 17 Nov 2021 18:48:14 GMT, Volker Simonis wrote: > In JDK 9, function objects implemented as anonymous inner classes in > java.util.regex.Pattern have been replaced by lambda functions (see > [JDK-8151481](https://bugs.openjdk.java.net/browse/JDK-8151481)). This led to > a significant

Re: RFR: 8281962: Avoid unnecessary native calls in InflaterInputStream

2022-02-17 Thread Christoph Langer
On Wed, 16 Feb 2022 09:30:46 GMT, Volker Simonis wrote: > Currently, `InflaterInputStream::read()` first does a native call to the > underlying zlib `inflate()` function and only afterwards checks if the > inflater requires input (i.e. `Inflater::needsInput()`) or has finished > inflating

Re: RFR: 8287162: (zipfs) Performance regression related to support for POSIX file permissions

2022-05-24 Thread Christoph Langer
On Mon, 23 May 2022 19:47:33 GMT, Lance Andersen wrote: > Hi all, > > This PR addresses the performance issue that is described in JDK-8287162. > > With this fix, the ZipFileSystem methods: initOwner, initGroup, and > initPermissions will not be invoked unless

Re: RFR: 8286594: (zipfs) Mention paths with dot elements in ZipException and cleanups

2022-05-14 Thread Christoph Langer
On Wed, 11 May 2022 19:20:15 GMT, Lance Andersen wrote: >> This augments the ZipException upon rejecting a Zip File containing entry >> names with "." or ".." elements. >> >> It furthermore tries to clean up & compact the logic for detecting "." and >> ".." and it adds a method

Integrated: 8286594: (zipfs) Mention paths with dot elements in ZipException and cleanups

2022-05-14 Thread Christoph Langer
On Wed, 11 May 2022 15:32:38 GMT, Christoph Langer wrote: > This augments the ZipException upon rejecting a Zip File containing entry > names with "." or ".." elements. > > It furthermore tries to clean up & compact the logic for detecting ".&qu

Re: RFR: 8286594: (zipfs) Mention paths with dot elements in ZipException and cleanups

2022-05-12 Thread Christoph Langer
On Thu, 12 May 2022 15:07:29 GMT, Sean Mullan wrote: > A more descriptive title for the bug report would be helpful. Fixed. - PR: https://git.openjdk.java.net/jdk/pull/8655

Re: RFR: JDK-8288094: cleanup old _MSC_VER handling

2022-06-10 Thread Christoph Langer
On Thu, 9 Jun 2022 11:37:21 GMT, Matthias Baesken wrote: > We still handle at a number of places ancient historic _MSC_VER versions of > Visual Studio releases e.g. pre VS2013 (VS2013 has _MSC_VER 1800). > This should be cleaned up, as long as it is not 3rd party code that we don't > want to

Re: RFR: 8286444: javac errors after JDK-8251329 are not helpful enough to find root cause

2022-05-10 Thread Christoph Langer
On Tue, 10 May 2022 16:30:01 GMT, Lance Andersen wrote: > > > @LanceAndersen @AlanBateman do you think adding the entry name in the > > > exception in ZipFileSystem is ok? If so, should it maybe go into a > > > different patch? > > > > > > It should be okay as this is the name of an entry in

RFR: 8286594: (zipfs) Improvements after JDK-8251329

2022-05-11 Thread Christoph Langer
This augments the ZipException upon rejecting a Zip File containing entry names with "." or ".." elements. It furthermore tries to clean up & compact the logic for detecting "." and ".." and it adds a method IndexNode:nameAsString() to return the node name as a String. - Commit

Re: RFR: 8286444: javac errors after JDK-8251329 are not helpful enough to find root cause

2022-05-09 Thread Christoph Langer
On Mon, 9 May 2022 22:10:54 GMT, Christoph Langer wrote: > After https://bugs.openjdk.java.net/browse/JDK-8251329, javac throws errors > when the classpath > contains jar files with . or .. in its name. The error message, however, does > not help to find > the culprit. This co

RFR: 8286444: javac errors after JDK-8251329 are not helpful enough to find root cause

2022-05-09 Thread Christoph Langer
After https://bugs.openjdk.java.net/browse/JDK-8251329, javac throws errors when the classpath contains jar files with . or .. in its name. The error message, however, does not help to find the culprit. This could be improved. - Commit messages: - JDK-8286444 Changes: