You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrey Yakushev (JIRA)" <ji...@apache.org> on 2007/07/17 16:51:04 UTC
[jira] Created: (HARMONY-4484) [jdktools][jdwp]
JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
[jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
------------------------------------------------------------------------------------------
Key: HARMONY-4484
URL: https://issues.apache.org/jira/browse/HARMONY-4484
Project: Harmony
Issue Type: Bug
Components: JDK
Environment: Revision: 556026
Reporter: Andrey Yakushev
If system class path contains spaces in some filenames then all JDWP tests fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4484) [jdktools][jdwp]
JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514614 ]
Gregory Shimansky commented on HARMONY-4484:
--------------------------------------------
This patch doesn't work on Linux. When you add quotes around classpath, it doesn't help because command line is broken into separate pieces with default StringTokenizer that doesn't care about quotes, so it breaks classpath argument if it contains spaces into separate arguments.
The reason why the patch works on windows is that Runtime.exec on windows builds command line back into single command line string, so quotes that it contains help to protect one argument from being split again by windows exec code. This doesn't work on linux because separate arguments split by StringTokenizer in Runtime.exec are not glued back together into one command line for execve or execvp.
The approach to build command line for Runtime.exec in JDWPUnitDebuggeeWrapper should be different. It should build a command line array with each argument a separate String. In this cause no automatic splitting will be done in Runtime.exec.
> [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-4484
> URL: https://issues.apache.org/jira/browse/HARMONY-4484
> Project: Harmony
> Issue Type: Bug
> Components: JDK
> Environment: Revision: 556026
> Reporter: Andrey Yakushev
> Assignee: Gregory Shimansky
> Attachments: H4484_spaces_in_class_path.patch
>
>
> If system class path contains spaces in some filenames then all JDWP tests fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-4484) [jdktools][jdwp]
JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gregory Shimansky resolved HARMONY-4484.
----------------------------------------
Resolution: Fixed
Patch applied at 559131. It did help now on Linux after HARMONY-2892 was committed. But there is one test OnthrowDebuggerLaunchTest which fails on all platforms when there are spaces in classpath. I wasn't able to quickly fix it by adding quotes around -cp argument, it seems to be a more complex problem. To check classpath with spaces on Linux I created a link to apache-ant-1.6.5 which I named "ant with spaces", set ANT_HOME to it and launched ant as "$ANT_HOME"/bin/ant. On windows I just used ant installed in "Program Files".
Please check that the bug is fixed now. For me all tests except for OnthrowDebuggerLaunchTest work ok.
> [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-4484
> URL: https://issues.apache.org/jira/browse/HARMONY-4484
> Project: Harmony
> Issue Type: Bug
> Components: JDK
> Environment: Revision: 556026
> Reporter: Andrey Yakushev
> Assignee: Gregory Shimansky
> Attachments: H4484_spaces_in_class_path.patch
>
>
> If system class path contains spaces in some filenames then all JDWP tests fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4484) [jdktools][jdwp]
JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514877 ]
Ivan Popov commented on HARMONY-4484:
-------------------------------------
Initial implementation of JPDA tests framework composed command line for debuggee JVM to be launched via Runtime.exec(String), and some tests rely on this implementation. It was cheaper to split such command line to be used with Runtime.exec(String[]) and preserve compatibility with existing tests.
Moreover, command line for debuggee JVM is formed from several fragments which may include random JVM options specified by user. If such options include spaces, they should be splitted anyway. Also, there is difference in handling quoted arguments in Runtime.exec(String) and Runtime.exec(String[]) on Windows and Linux platforms (mentioned in HARMONY-2892), which is solved by the custom splitter. Thus, using custom splitter is preferable solution in this case.
> [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-4484
> URL: https://issues.apache.org/jira/browse/HARMONY-4484
> Project: Harmony
> Issue Type: Bug
> Components: JDK
> Environment: Revision: 556026
> Reporter: Andrey Yakushev
> Assignee: Gregory Shimansky
> Attachments: H4484_spaces_in_class_path.patch
>
>
> If system class path contains spaces in some filenames then all JDWP tests fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-4484) [jdktools][jdwp]
JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gregory Shimansky reassigned HARMONY-4484:
------------------------------------------
Assignee: Gregory Shimansky
> [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-4484
> URL: https://issues.apache.org/jira/browse/HARMONY-4484
> Project: Harmony
> Issue Type: Bug
> Components: JDK
> Environment: Revision: 556026
> Reporter: Andrey Yakushev
> Assignee: Gregory Shimansky
> Attachments: H4484_spaces_in_class_path.patch
>
>
> If system class path contains spaces in some filenames then all JDWP tests fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4484) [jdktools][jdwp]
JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
Posted by "Andrey Yakushev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Yakushev updated HARMONY-4484:
-------------------------------------
Attachment: H4484_spaces_in_class_path.patch
H4484_spaces_in_class_path.patch adds additional "" for -cp key. I checked it on Windows 64bit platform. I think it will work on others, but didn't verify them yet.
> [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-4484
> URL: https://issues.apache.org/jira/browse/HARMONY-4484
> Project: Harmony
> Issue Type: Bug
> Components: JDK
> Environment: Revision: 556026
> Reporter: Andrey Yakushev
> Attachments: H4484_spaces_in_class_path.patch
>
>
> If system class path contains spaces in some filenames then all JDWP tests fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4484) [jdktools][jdwp]
JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514624 ]
Ivan Popov commented on HARMONY-4484:
-------------------------------------
Patch for HARMONY-2892 (H2892_jdwp_tests.patch) fixes problem with using Runtime.exec() in JDWP tests on Linux. Applying given patch after HARMONY-2892 should solve problem with spaces in -cp argument.
> [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-4484
> URL: https://issues.apache.org/jira/browse/HARMONY-4484
> Project: Harmony
> Issue Type: Bug
> Components: JDK
> Environment: Revision: 556026
> Reporter: Andrey Yakushev
> Assignee: Gregory Shimansky
> Attachments: H4484_spaces_in_class_path.patch
>
>
> If system class path contains spaces in some filenames then all JDWP tests fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4484) [jdktools][jdwp]
JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514639 ]
Gregory Shimansky commented on HARMONY-4484:
--------------------------------------------
I just wonder about the necessity to write our own command line splitter instead of creating command line as an array of Strings into the first place. Perhaps I am missing something here...
> [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-4484
> URL: https://issues.apache.org/jira/browse/HARMONY-4484
> Project: Harmony
> Issue Type: Bug
> Components: JDK
> Environment: Revision: 556026
> Reporter: Andrey Yakushev
> Assignee: Gregory Shimansky
> Attachments: H4484_spaces_in_class_path.patch
>
>
> If system class path contains spaces in some filenames then all JDWP tests fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-4484) [jdktools][jdwp]
JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gregory Shimansky closed HARMONY-4484.
--------------------------------------
No response, assuming ok.
> [jdktools][jdwp] JDWPUnitDebuggeeWrapper incorrectly handles spaces in classpath filenames
> ------------------------------------------------------------------------------------------
>
> Key: HARMONY-4484
> URL: https://issues.apache.org/jira/browse/HARMONY-4484
> Project: Harmony
> Issue Type: Bug
> Components: JDK
> Environment: Revision: 556026
> Reporter: Andrey Yakushev
> Assignee: Gregory Shimansky
> Attachments: H4484_spaces_in_class_path.patch
>
>
> If system class path contains spaces in some filenames then all JDWP tests fail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.