public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/18115] New: JNI nio buffer functions only work with byte buffers
@ 2004-10-22 19:52 juhal at users dot sourceforge dot net
2004-10-22 20:03 ` [Bug libgcj/18115] " konqueror at gmx dot de
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: juhal at users dot sourceforge dot net @ 2004-10-22 19:52 UTC (permalink / raw)
To: java-prs
The following does not work properly:
Java:
ByteBuffer directByteBuffer = ByteBuffer.allocateDirect(10);
IntBuffer directIntBuffer = directByteBuffer.asIntBuffer();
JNI:
(*env)->GetDirectBufferAddress(env, directIntBuffer);
The reason for the failure is that GetDirectBufferAddress expects that the
buffer is an instance of DirectByteBufferImpl, when in this case it is actually
an instance of IntViewBufferImpl containing directByteBuffer.
--
Summary: JNI nio buffer functions only work with byte buffers
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: juhal at users dot sourceforge dot net
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org,konqueror at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18115
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcj/18115] JNI nio buffer functions only work with byte buffers
2004-10-22 19:52 [Bug libgcj/18115] New: JNI nio buffer functions only work with byte buffers juhal at users dot sourceforge dot net
@ 2004-10-22 20:03 ` konqueror at gmx dot de
2004-10-22 20:10 ` juhal at users dot sourceforge dot net
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: konqueror at gmx dot de @ 2004-10-22 20:03 UTC (permalink / raw)
To: java-prs
------- Additional Comments From konqueror at gmx dot de 2004-10-22 20:03 -------
Confirmed
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-10-22 20:03:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18115
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcj/18115] JNI nio buffer functions only work with byte buffers
2004-10-22 19:52 [Bug libgcj/18115] New: JNI nio buffer functions only work with byte buffers juhal at users dot sourceforge dot net
2004-10-22 20:03 ` [Bug libgcj/18115] " konqueror at gmx dot de
@ 2004-10-22 20:10 ` juhal at users dot sourceforge dot net
2005-01-07 11:32 ` cvs-commit at gcc dot gnu dot org
2005-01-07 13:46 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: juhal at users dot sourceforge dot net @ 2004-10-22 20:10 UTC (permalink / raw)
To: java-prs
------- Additional Comments From juhal at users dot sourceforge dot net 2004-10-22 20:10 -------
The patch from #18116 contains a fix for the problem
http://gcc.gnu.org/bugzilla/attachment.cgi?id=7403&action=view
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18115
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcj/18115] JNI nio buffer functions only work with byte buffers
2004-10-22 19:52 [Bug libgcj/18115] New: JNI nio buffer functions only work with byte buffers juhal at users dot sourceforge dot net
2004-10-22 20:03 ` [Bug libgcj/18115] " konqueror at gmx dot de
2004-10-22 20:10 ` juhal at users dot sourceforge dot net
@ 2005-01-07 11:32 ` cvs-commit at gcc dot gnu dot org
2005-01-07 13:46 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-07 11:32 UTC (permalink / raw)
To: java-prs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-07 11:32 -------
Subject: Bug 18115
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mkoch@gcc.gnu.org 2005-01-07 11:32:07
Modified files:
libjava : ChangeLog jni.cc
libjava/java/nio: Buffer.java CharViewBufferImpl.java
DirectByteBufferImpl.java
DoubleViewBufferImpl.java
FloatViewBufferImpl.java
IntViewBufferImpl.java LongViewBufferImpl.java
MappedByteBufferImpl.java
ShortViewBufferImpl.java
Added files:
libjava/testsuite/libjava.jni: directbuffer.c directbuffer.java
directbuffer.out bytebuffer.c
bytebuffer.java bytebuffer.out
Log message:
2005-01-07 Michael Koch <konqueror@gmx.de>
PR libgcj/18115
* java/nio/Buffer.java (address): New field.
* java/nio/DirectByteBufferImpl.java (address): Removed.
* java/nio/MappedByteBufferImpl.java (address): Likewise.
* java/nio/CharViewBufferImpl.java (CharViewBufferImpl):
Explicitly initialize Buffer.address if needed.
* java/nio/DoubleViewBufferImpl.java (DoubleViewBufferImpl): Likewise.
* java/nio/FloatViewBufferImpl.java (FloatViewBufferImpl): Likewise.
* java/nio/IntViewBufferImpl.java (IntViewBufferImpl): Likewise.
* java/nio/LongViewBufferImpl.java (LongViewBufferImpl): Likewise.
* java/nio/ShortViewBufferImpl.java (ShortViewBufferImpl): Likewise.
* jni.cc (_Jv_JNI_GetDirectBufferAddress): Don't assume buffer is a
DirectByteBufferImpl object.
(_Jv_JNI_GetDirectBufferCapacity): Likewise.
* testsuite/libjava.jni/directbuffer.c,
testsuite/libjava.jni/directbuffer.java,
testsuite/libjava.jni/directbuffer.out,
testsuite/libjava.jni/bytebuffer.c,
testsuite/libjava.jni/bytebuffer.java,
testsuite/libjava.jni/bytebuffer.out: New files.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3273&r2=1.3274
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/jni.cc.diff?cvsroot=gcc&r1=1.91&r2=1.92
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/nio/Buffer.java.diff?cvsroot=gcc&r1=1.10&r2=1.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/nio/CharViewBufferImpl.java.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/nio/DirectByteBufferImpl.java.diff?cvsroot=gcc&r1=1.16&r2=1.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/nio/DoubleViewBufferImpl.java.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/nio/FloatViewBufferImpl.java.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/nio/IntViewBufferImpl.java.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/nio/LongViewBufferImpl.java.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/nio/MappedByteBufferImpl.java.diff?cvsroot=gcc&r1=1.14&r2=1.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/nio/ShortViewBufferImpl.java.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.jni/directbuffer.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.jni/directbuffer.java.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.jni/directbuffer.out.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.jni/bytebuffer.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.jni/bytebuffer.java.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.jni/bytebuffer.out.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18115
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcj/18115] JNI nio buffer functions only work with byte buffers
2004-10-22 19:52 [Bug libgcj/18115] New: JNI nio buffer functions only work with byte buffers juhal at users dot sourceforge dot net
` (2 preceding siblings ...)
2005-01-07 11:32 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-07 13:46 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-07 13:46 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-07 13:46 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18115
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-01-07 13:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-22 19:52 [Bug libgcj/18115] New: JNI nio buffer functions only work with byte buffers juhal at users dot sourceforge dot net
2004-10-22 20:03 ` [Bug libgcj/18115] " konqueror at gmx dot de
2004-10-22 20:10 ` juhal at users dot sourceforge dot net
2005-01-07 11:32 ` cvs-commit at gcc dot gnu dot org
2005-01-07 13:46 ` pinskia 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).