public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libgcj/2338: RandomAccessFile does not create the file if not found
@ 2001-12-02 19:36 rodrigc
0 siblings, 0 replies; 3+ messages in thread
From: rodrigc @ 2001-12-02 19:36 UTC (permalink / raw)
To: tromey; +Cc: gcc-prs
The following reply was made to PR libgcj/2338; it has been noted by GNATS.
From: rodrigc@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
java-prs@gcc.gnu.org, pedro@vis.ethz.ch, tromey@gcc.gnu.org
Cc:
Subject: Re: libgcj/2338: RandomAccessFile does not create the file if not found
Date: 3 Dec 2001 03:34:17 -0000
Synopsis: RandomAccessFile does not create the file if not found
State-Changed-From-To: feedback->closed
State-Changed-By: rodrigc
State-Changed-When: Sun Dec 2 19:34:16 2001
State-Changed-Why:
Fixed.
http://gcc.gnu.org/ml/gcc-cvs/2001-03/msg00552.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2338&database=gcc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libgcj/2338: RandomAccessFile does not create the file if not found
@ 2001-12-02 19:34 rodrigc
0 siblings, 0 replies; 3+ messages in thread
From: rodrigc @ 2001-12-02 19:34 UTC (permalink / raw)
To: gcc-bugs, gcc-gnats, gcc-prs, java-prs, pedro, tromey
Synopsis: RandomAccessFile does not create the file if not found
State-Changed-From-To: feedback->closed
State-Changed-By: rodrigc
State-Changed-When: Sun Dec 2 19:34:16 2001
State-Changed-Why:
Fixed.
http://gcc.gnu.org/ml/gcc-cvs/2001-03/msg00552.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=2338&database=gcc
^ permalink raw reply [flat|nested] 3+ messages in thread
* libgcj/2338: RandomAccessFile does not create the file if not found
@ 2001-03-21 6:06 pedro
0 siblings, 0 replies; 3+ messages in thread
From: pedro @ 2001-03-21 6:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 2338
>Category: libgcj
>Synopsis: RandomAccessFile does not create the file if not found
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 21 06:06:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: pedro@vis.ethz.ch
>Release: gcc 3.0 latest snapshot
>Organization:
>Environment:
redhat linux 6.2 for i686
>Description:
java.io.RandomAccessFile creates/opens a file for reading
and/or writing.
it calls java.io.FileDescriptor(<filename>,<mode>) - where
mode is either FileDescriptor.READ or FileDescriptor.READ.
FileDescriptor passes these args to natFileDesciptorPosix.cc
who translates them for the posix "open" function, yet does
not add O_CREAT for the "rw" case as would be required by
java.io.FileDeescriptor
open returns an error value which is translated to an
IOException.
>How-To-Repeat:
compile and run the attached program it opens a
java.io.RandomAccessFile (first arg) and tries to write to
it. with gcj this crashes, with any other java it works.
>Fix:
added
static final int CREATE = 16;
to java.io.Filedescriptor and or'ed it to the
java.io.RandomAccessFile constructor for "rw". also added
if (jflags & CREATE)
flags |= O_CREAT;
to natFileDescriptor.cc for the whole thing to actualy do
something.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="RAFTest.java"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="RAFTest.java"
aW1wb3J0IGphdmEuaW8uRmlsZTsKaW1wb3J0IGphdmEuaW8uUmFuZG9tQWNjZXNzRmlsZTsKaW1w
b3J0IGphdmEuaW8uSU9FeGNlcHRpb247CgpjbGFzcyBSQUZUZXN0IHsKCglwdWJsaWMgc3RhdGlj
IHZvaWQgbWFpbiAoIFN0cmluZyBhcmdzW10gKSB7CgkKCQlSYW5kb21BY2Nlc3NGaWxlIHJhZiA9
IG51bGw7CgkJCgkJdHJ5IHsKCQkJcmFmID0gbmV3IFJhbmRvbUFjY2Vzc0ZpbGUoYXJnc1swXSwi
cnciKTsKCQkJfQoJCWNhdGNoICggSU9FeGNlcHRpb24gZSApIHsKCQkJU3lzdGVtLm91dC5wcmlu
dGxuKCJSQUZUZXN0Lk1haW46IGdvdCBJT0V4Y2VwdGlvbiBvbiBSQUYgaW5pdDoiKTsKCQkJU3lz
dGVtLm91dC5wcmludGxuKGUuZ2V0TWVzc2FnZSgpKTsKCQkJcmV0dXJuOwoJCQl9CgoJCXRyeSB7
CgkJCXJhZi53cml0ZUNoYXJzKCJyYWYtdGVzdC4uLlxuIik7CgkJCXJhZi5jbG9zZSgpOwoJCQl9
CgkJY2F0Y2ggKCBJT0V4Y2VwdGlvbiBlICkgewoJCQlTeXN0ZW0ub3V0LnByaW50bG4oIlJBRlRl
c3QuTWFpbjogZ290IElPRXhjZXB0aW9uIG9uIFJBRiBhY2Nlc3M6Iik7CgkJCVN5c3RlbS5vdXQu
cHJpbnRsbihlLmdldE1lc3NhZ2UoKSk7CgkJCXJldHVybjsKCQkJfQoKCQl9CgoJfQo=
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-12-03 3:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-02 19:36 libgcj/2338: RandomAccessFile does not create the file if not found rodrigc
-- strict thread matches above, loose matches on Subject: below --
2001-12-02 19:34 rodrigc
2001-03-21 6:06 pedro
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).