public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/20198] New: java.security.CodeSource.getLocation output is different than expected
@ 2005-02-24 22:15 bkonrath at redhat dot com
  2005-07-24 19:49 ` [Bug libgcj/20198] " green at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: bkonrath at redhat dot com @ 2005-02-24 22:15 UTC (permalink / raw)
  To: java-prs

GCJ version:

% gij4 --version
gij (GNU libgcj) version 4.0.0 20050217 (Red Hat 4.0.0-0.27)

Test class:

public class Test {
	public static void main(String[] args) {
		System.out.println(Test.class.getProtectionDomain().
                getCodeSource().getLocation());
	}
}

With Sun VM 1.4.2_06 I get:

% j2sdk1.4.2_06/bin/java Test
file:/home/bkonrath/

With GCJ I get: 

% gij4 Test
file:./

I also noticed that the SUN vm returns a URL that has symlinks resolved. Let me
know if you need more info or if I should file this bug somewhere else.

-- 
           Summary: java.security.CodeSource.getLocation output is different
                    than expected
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkonrath at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/20198] java.security.CodeSource.getLocation output is different than expected
  2005-02-24 22:15 [Bug libgcj/20198] New: java.security.CodeSource.getLocation output is different than expected bkonrath at redhat dot com
@ 2005-07-24 19:49 ` green at redhat dot com
  2005-07-26 22:11 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: green at redhat dot com @ 2005-07-24 19:49 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From green at redhat dot com  2005-07-24 19:49 -------
Created an attachment (id=9352)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9352&action=view)
Proposed patch

This patch makes your test program emit an absolute path.

I'm not sure it's 100% correct.  For instance, perhaps we should canonicalize
the path in addition to makeing it absolute.  Also, perhaps this should happen
in URLClassLoader instead of the system loader.  Hopefully a discussion will
happen on this thread:

http://gcc.gnu.org/ml/java-patches/2005-q3/msg00144.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/20198] java.security.CodeSource.getLocation output is different than expected
  2005-02-24 22:15 [Bug libgcj/20198] New: java.security.CodeSource.getLocation output is different than expected bkonrath at redhat dot com
  2005-07-24 19:49 ` [Bug libgcj/20198] " green at redhat dot com
@ 2005-07-26 22:11 ` pinskia at gcc dot gnu dot org
  2005-07-26 23:19 ` [Bug classpath/20198] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26 22:11 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 22:10 -------
This is a classpath issue and should be moved to classpath/classpath but I cannot move it for some 
reason.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-26 22:10:59
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug classpath/20198] java.security.CodeSource.getLocation output is different than expected
  2005-02-24 22:15 [Bug libgcj/20198] New: java.security.CodeSource.getLocation output is different than expected bkonrath at redhat dot com
  2005-07-24 19:49 ` [Bug libgcj/20198] " green at redhat dot com
  2005-07-26 22:11 ` pinskia at gcc dot gnu dot org
@ 2005-07-26 23:19 ` pinskia at gcc dot gnu dot org
  2005-09-16 23:10 ` green at redhat dot com
  2005-09-16 23:12 ` cvs-commit at developer dot classpath dot org
  4 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26 23:19 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 23:19 -------
Moving to classpath/classpath.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bug-classpath at gnu dot org
          Component|libgcj                      |classpath
            Product|gcc                         |classpath
            Version|4.0.0                       |unspecified


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug classpath/20198] java.security.CodeSource.getLocation output is different than expected
  2005-02-24 22:15 [Bug libgcj/20198] New: java.security.CodeSource.getLocation output is different than expected bkonrath at redhat dot com
                   ` (2 preceding siblings ...)
  2005-07-26 23:19 ` [Bug classpath/20198] " pinskia at gcc dot gnu dot org
@ 2005-09-16 23:10 ` green at redhat dot com
  2005-09-16 23:12 ` cvs-commit at developer dot classpath dot org
  4 siblings, 0 replies; 11+ messages in thread
From: green at redhat dot com @ 2005-09-16 23:10 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From green at redhat dot com  2005-09-16 23:10 -------
(In reply to comment #1)
> Created an attachment (id=9352)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9352&action=view)
> Proposed patch
> 
> This patch makes your test program emit an absolute path.
> 
> I'm not sure it's 100% correct.  For instance, perhaps we should canonicalize
> the path in addition to makeing it absolute.  Also, perhaps this should happen
> in URLClassLoader instead of the system loader.  Hopefully a discussion will
> happen on this thread:
> 
> http://gcc.gnu.org/ml/java-patches/2005-q3/msg00144.html
> 


I just checked in a patch for a related fix.   The test case look like this:

public class bug
{
    public static void main (String args[]) throws Exception
    {
        String urlString =
bug.class.getClassLoader().getResource("bug.class").toExternalForm ();
        System.out.println (urlString);
    }
}

Before patch:

$ gij bug
file:./bug.class

After patch:

$ gij bug
file:/home/green/FSF/HEAD/bug.class

Unfortunately it doesn't fix this bug (although the original patch attached to
this bug _does_).

I'll figure out what else is needed for this bug.

AG


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |green at redhat dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-07-26 22:10:59         |2005-09-16 23:10:50
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug classpath/20198] java.security.CodeSource.getLocation output is different than expected
  2005-02-24 22:15 [Bug libgcj/20198] New: java.security.CodeSource.getLocation output is different than expected bkonrath at redhat dot com
                   ` (3 preceding siblings ...)
  2005-09-16 23:10 ` green at redhat dot com
@ 2005-09-16 23:12 ` cvs-commit at developer dot classpath dot org
  4 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at developer dot classpath dot org @ 2005-09-16 23:12 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at developer dot classpath dot org  2005-09-16 23:12 -------
Subject: Bug 20198

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Branch: 	
Changes by:	Anthony Green <green@savannah.gnu.org>	05/09/16 22:52:18

Modified files:
	.              : ChangeLog 
	java/net       : URLClassLoader.java 

Log message:
	2005-09-15  Anthony Green  <green@redhat.com>
	
	PR libgcj/20198
	* java/net/URLClassLoader.java (FileURLLoader.getResource): File
	resources should all have canonicalized names.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4834&tr2=1.4835&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/URLClassLoader.java.diff?tr1=1.36&tr2=1.37&r1=text&r2=text






-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug classpath/20198] java.security.CodeSource.getLocation output is different than expected
       [not found] <bug-20198-10161@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-01-17 23:25 ` tromey at gcc dot gnu dot org
@ 2006-01-18  0:19 ` cvs-commit at developer dot classpath dot org
  2006-01-18  0:19 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at developer dot classpath dot org @ 2006-01-18  0:19 UTC (permalink / raw)
  To: java-prs



------- Comment #10 from cvs-commit at developer dot classpath dot org  2006-01-18 00:19 -------
Subject: Bug 20198

CVSROOT:        /cvsroot/classpath
Module name:    classpath
Branch:         
Changes by:     Tom Tromey <tromey@savannah.gnu.org>    06/01/18 00:19:13

Modified files:
        .              : ChangeLog 
        java/net       : URLClassLoader.java 

Log message:
        PR classpath/20198:
        * java/net/URLClassLoader.java (FileURLLoader): Added argument.
        (JarURLLoader): Likewise.
        (addURLImpl): Canonicalize file URLs.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6106&tr2=1.6107&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/java/net/URLClassLoader.java.diff?tr1=1.43&tr2=1.44&r1=text&r2=text


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug classpath/20198] java.security.CodeSource.getLocation output is different than expected
       [not found] <bug-20198-10161@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-01-18  0:19 ` cvs-commit at developer dot classpath dot org
@ 2006-01-18  0:19 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-01-18  0:19 UTC (permalink / raw)
  To: java-prs



------- Comment #9 from tromey at gcc dot gnu dot org  2006-01-18 00:19 -------
Fixed in classpath cvs; also in gcc 4.1.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |0.21


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug classpath/20198] java.security.CodeSource.getLocation output is different than expected
       [not found] <bug-20198-10161@http.gcc.gnu.org/bugzilla/>
  2006-01-17  1:17 ` tromey at gcc dot gnu dot org
  2006-01-17 19:59 ` tromey at gcc dot gnu dot org
@ 2006-01-17 23:25 ` tromey at gcc dot gnu dot org
  2006-01-18  0:19 ` cvs-commit at developer dot classpath dot org
  2006-01-18  0:19 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-01-17 23:25 UTC (permalink / raw)
  To: java-prs



------- Comment #8 from tromey at gcc dot gnu dot org  2006-01-17 23:25 -------
Subject: Bug 20198

Author: tromey
Date: Tue Jan 17 23:25:12 2006
New Revision: 109844

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109844
Log:
        PR classpath/20198:
        * java/net/URLClassLoader.java (FileURLLoader): Added argument.
        (JarURLLoader): Likewise.
        (addURLImpl): Canonicalize file URLs.

Modified:
    trunk/libjava/ChangeLog
    trunk/libjava/java/net/URLClassLoader.java


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug classpath/20198] java.security.CodeSource.getLocation output is different than expected
       [not found] <bug-20198-10161@http.gcc.gnu.org/bugzilla/>
  2006-01-17  1:17 ` tromey at gcc dot gnu dot org
@ 2006-01-17 19:59 ` tromey at gcc dot gnu dot org
  2006-01-17 23:25 ` tromey at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-01-17 19:59 UTC (permalink / raw)
  To: java-prs



------- Comment #7 from tromey at gcc dot gnu dot org  2006-01-17 19:59 -------
Subject: Bug 20198

Author: tromey
Date: Tue Jan 17 19:59:29 2006
New Revision: 109837

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109837
Log:
        PR classpath/20198:
        * java/net/URLClassLoader.java (FileURLLoader): Added argument.
        (JarURLLoader): Likewise.
        (addURLImpl): Canonicalize file URLs.

Modified:
    branches/gcc-4_1-branch/libjava/ChangeLog
    branches/gcc-4_1-branch/libjava/java/net/URLClassLoader.java


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug classpath/20198] java.security.CodeSource.getLocation output is different than expected
       [not found] <bug-20198-10161@http.gcc.gnu.org/bugzilla/>
@ 2006-01-17  1:17 ` tromey at gcc dot gnu dot org
  2006-01-17 19:59 ` tromey at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-01-17  1:17 UTC (permalink / raw)
  To: java-prs



------- Comment #6 from tromey at gcc dot gnu dot org  2006-01-17 01:17 -------
Testing a patch.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|green at redhat dot com     |tromey at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-01-18  0:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-24 22:15 [Bug libgcj/20198] New: java.security.CodeSource.getLocation output is different than expected bkonrath at redhat dot com
2005-07-24 19:49 ` [Bug libgcj/20198] " green at redhat dot com
2005-07-26 22:11 ` pinskia at gcc dot gnu dot org
2005-07-26 23:19 ` [Bug classpath/20198] " pinskia at gcc dot gnu dot org
2005-09-16 23:10 ` green at redhat dot com
2005-09-16 23:12 ` cvs-commit at developer dot classpath dot org
     [not found] <bug-20198-10161@http.gcc.gnu.org/bugzilla/>
2006-01-17  1:17 ` tromey at gcc dot gnu dot org
2006-01-17 19:59 ` tromey at gcc dot gnu dot org
2006-01-17 23:25 ` tromey at gcc dot gnu dot org
2006-01-18  0:19 ` cvs-commit at developer dot classpath dot org
2006-01-18  0:19 ` tromey at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).