Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-21 Thread yumin qi
Roger, Thanks. Pushed. On Wed, Feb 21, 2018 at 2:00 PM, Roger Riggs wrote: > Hi Yumin, > > Use your OpenJDK id "minqi" for the Author instead of your email. > > Roger > > > > On 2/21/2018 4:54 PM, yumin qi wrote: > >> Alan, >> >>Somehow there is a problem for me

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-21 Thread Roger Riggs
Hi Yumin, Use your OpenJDK id  "minqi" for the Author instead of your email. Roger On 2/21/2018 4:54 PM, yumin qi wrote: Alan, Somehow there is a problem for me to push the changeset: pushing to ssh://mi...@hg.openjdk.java.net/jdk/jdk searching for changes remote: adding changesets

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-21 Thread yumin qi
Alan, Somehow there is a problem for me to push the changeset: pushing to ssh://mi...@hg.openjdk.java.net/jdk/jdk searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 3 changes to 3 files remote: [jcheck

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-19 Thread yumin qi
Yes, I am committer. Brian, do you okay with the version? If no objection, I will push it into jdk. Thanks Yumin On Mon, Feb 19, 2018 at 2:28 AM, Alan Bateman wrote: > On 19/02/2018 05:09, yumin qi wrote: > >> Thanks! >> >> I need a sponsor for pushing it to jdk. Can

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-19 Thread Alan Bateman
On 19/02/2018 05:09, yumin qi wrote: Thanks! I need a sponsor for pushing it to jdk. Can you or someone else help to push it? minqi is a jdk committer. If this is you then you should be able to push it yourself. -Alan.

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-18 Thread yumin qi
Thanks! I need a sponsor for pushing it to jdk. Can you or someone else help to push it? Yumin On Fri, Feb 16, 2018 at 11:45 PM, Alan Bateman wrote: > On 16/02/2018 20:35, yumin qi wrote: > > : > >> >> Updated bug, and update webrev at same link: >

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-16 Thread Alan Bateman
On 16/02/2018 20:35, yumin qi wrote: : Updated bug,  and update webrev at same link: http://cr.openjdk.java.net/~minqi/8194154/webrev1/ I think this version is good to go. -Alan

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-16 Thread yumin qi
On Fri, Feb 16, 2018 at 3:52 AM, Alan Bateman wrote: > On 15/02/2018 20:28, yumin qi wrote: > >> : >> Since the property string contains non-normalized characters, it >> crashed in native canonicalize. >> I believe user.dir from the system is normalized, so it is

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-16 Thread Alan Bateman
On 15/02/2018 20:28, yumin qi wrote: :     Since the property string contains non-normalized characters, it crashed in native canonicalize.     I believe user.dir from the system is normalized, so it is OK but after it is changed like "/home/a/b/c/", it crashed.     Now with using cached

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-15 Thread yumin qi
Hi, Alan The real reason, for why File.getCanonicalPath() will fail after "user.dir" property changed is, in File.java: public String getCanonicalPath() throws IOException { if (isInvalid()) { throw new IOException("Invalid file path"); } return

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-15 Thread Alan Bateman
On 15/02/2018 18:41, yumin qi wrote: There are two problems here, so become complex. 1) crash on parsing "//", which included in file path, on linux. This is fixed in UnixFileSystem.java in resolve function. 2) user.dir should be read only. This is fixed in both UnixFileSystem.java and

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-15 Thread yumin qi
There are two problems here, so become complex. 1) crash on parsing "//", which included in file path, on linux. This is fixed in UnixFileSystem.java in resolve function. 2) user.dir should be read only. This is fixed in both UnixFileSystem.java and WinNTFileSystem.java. The test case covers two

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-15 Thread yumin qi
OK, let's work on a suitable test case. Thanks Yumin On Thu, Feb 15, 2018 at 9:41 AM, Alan Bateman wrote: > On 15/02/2018 17:25, yumin qi wrote: > >> Alan, >> >> The real reason is if we do not change on resolve, the string passed >> into native canonicalize will be

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-15 Thread Alan Bateman
On 15/02/2018 17:25, yumin qi wrote: Alan,   The real reason is if we do not change on resolve, the string passed into native canonicalize will be like "//./a/" which is not expected in native part. In native part, we resume that no more "//" in the path string (already normalized in java).

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-15 Thread yumin qi
Alan, The real reason is if we do not change on resolve, the string passed into native canonicalize will be like "//./a/" which is not expected in native part. In native part, we resume that no more "//" in the path string (already normalized in java). We can fix this by either: 1) in

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-15 Thread Alan Bateman
On 14/02/2018 23:52, yumin qi wrote: Brian,   Updated using RuntimeException, which will not need -ea so removed. http://cr.openjdk.java.net/~minqi/8194154/webrev1/ Can you explain why resolve has been changed to call normalize

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-14 Thread yumin qi
Brian, Updated using RuntimeException, which will not need -ea so removed. http://cr.openjdk.java.net/~minqi/8194154/webrev1/ Thanks Yumin On Wed, Feb 14, 2018 at 11:17 AM, Brian Burkhalter < brian.burkhal...@oracle.com> wrote: > Hello, > > In the test you have > > /* @test requires

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-14 Thread Brian Burkhalter
Hello, In the test you have /* @test requires (os.family == "linux") | (os.family == "mac") | (os.family == "solaris") | (os.family == "aix") @bug 8194154 @summary Test parsing path with double slashes on unix like platforms. */ but I think you need to have the @requires annotation on a

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-14 Thread yumin qi
Hi, Alan Thanks. Updated on same link http://cr.openjdk.java.net/~minqi/8194154/webrev1/ as your recommendation. Yumin On Wed, Feb 14, 2018 at 4:42 AM, Alan Bateman wrote: > On 14/02/2018 01:23, yumin qi wrote: > >> Hi, >> >> I have update the webrev: >>

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-14 Thread Alan Bateman
On 14/02/2018 01:23, yumin qi wrote: Hi,   I have update the webrev: http://cr.openjdk.java.net/~minqi/8194154/webrev1/   In this version, as suggested by Alan(thanks!), property of "user.dir" is cached and behave like it is 'read

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-13 Thread yumin qi
HI, Brian Thanks, updated on same link. I don't have platforms other than linux so could not test on those platforms. BTW, tried jtreg, it seems the version has not modified to run with current jdk repo. Thanks Yumin On Tue, Feb 13, 2018 at 5:52 PM, Brian Burkhalter <

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-13 Thread Brian Burkhalter
Hi, As for the test alone you could add the @requires annotation [1] @requires (os.family == "linux") | (os.family == "mac") | (os.family == "solaris") | (os.family == "aix") instead of programmatically exiting if the platform is not Windows. (I am assuming that this should be run on all Unix

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-13 Thread yumin qi
Hi, I have update the webrev: http://cr.openjdk.java.net/~minqi/8194154/webrev1/ In this version, as suggested by Alan(thanks!), property of "user.dir" is cached and behave like it is 'read only'. The change made to *inux as well as windows. Since property of "user.dir" is cached, any

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-07 Thread yumin qi
David, Thanks! On Wed, Feb 7, 2018 at 7:32 PM, David Holmes wrote: > Moving to core-libs-dev. Code reviews don't take place on jdk-dev but on > the component area mailing lists. > > Thanks, > David > > > On 8/02/2018 6:10 AM, yumin qi wrote: > >> Hi, >> >>Please

Re: RFR: 8194154: JDK crashes parsing path string contains '//' on linux

2018-02-07 Thread David Holmes
Moving to core-libs-dev. Code reviews don't take place on jdk-dev but on the component area mailing lists. Thanks, David On 8/02/2018 6:10 AM, yumin qi wrote: Hi, Please review the fix (extra small) for: bug 8194154: https://bugs.openjdk.java.net/browse/JDK-8194154 webrev: