public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/16032] New: libgcj should reject class files with incorrect version numbers
@ 2004-06-17  3:51 tromey at gcc dot gnu dot org
  2004-09-16  7:17 ` [Bug libgcj/16032] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-06-17  3:51 UTC (permalink / raw)
  To: java-prs

Currently libgcj allows class files with bad version numbers.
>From defineclass.cc:

  /* FIXME: Decide which range of version numbers to allow */

  /* int minor_version = */ read2u ();
  /* int major_verson  = */ read2u ();

Sun's JDK rejects some files with bad version numbers,
we ought to as well.

-- 
           Summary: libgcj should reject class files with incorrect version
                    numbers
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tromey at gcc dot gnu dot org
                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=16032


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

* [Bug libgcj/16032] libgcj should reject class files with incorrect version numbers
  2004-06-17  3:51 [Bug libgcj/16032] New: libgcj should reject class files with incorrect version numbers tromey at gcc dot gnu dot org
@ 2004-09-16  7:17 ` pinskia at gcc dot gnu dot org
  2005-04-17 21:07 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-16  7:17 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-16 07:17:10
               date|                            |


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


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

* [Bug libgcj/16032] libgcj should reject class files with incorrect version numbers
  2004-06-17  3:51 [Bug libgcj/16032] New: libgcj should reject class files with incorrect version numbers tromey at gcc dot gnu dot org
  2004-09-16  7:17 ` [Bug libgcj/16032] " pinskia at gcc dot gnu dot org
@ 2005-04-17 21:07 ` cvs-commit at gcc dot gnu dot org
  2005-09-15 22:02 ` cvs-commit at gcc dot gnu dot org
  2005-09-15 22:05 ` tromey at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-17 21:07 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-17 21:07 -------
Subject: Bug 16032

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcjx-branch
Changes by:	tromey@gcc.gnu.org	2005-04-17 21:07:22

Modified files:
	gcjx           : ChangeLog 
	gcjx/bytecode  : verify.cc 
	libjava        : ChangeLog Makefile.in configure configure.ac 
	                 defineclass.cc 
	libjava/include: java-interp.h verify.h 
	libjava/java/lang: Class.h 
Removed files:
	libjava        : verify.cc 

Log message:
	gcjx:
	* bytecode/verify.cc (branch_prepass): Cast argument to sprintf.
	(verify_instructions_0): Likewise.
	(VFY_FAST_OPCODES): Changed sense of #ifdef.
	libjava:
	PR libgcj/16032:
	* java/lang/Class.h (Class): Added friend class.
	* include/verify.h (vfy_is_15): Implement.
	(VFY_FAST_OPCODES): New define.
	Updated #includes.
	(vfy_is_static): Use Modifier, not ACC_*.
	(vfy_is_abstract): Likewise.
	(vfy_hand_off_flags): New function.
	(vfy_fail): Cast argument to 'append'.
	(vfy_get_exceptions): Rewrote.
	(vfy_tag): Fixed typo.
	(vfy_load_indexes): Use correct slot in constant pool.
	(vfy_constants): Changed type.
	(vfy_uint_16): Likewise.
	(vfy_find_class): Removed argument name.
	(vfy_get_pool_class): Likewise.
	(vfy_iface_iterator_begin): Likewise.
	(vfy_get_interface): Likewise.
	(vfy_make_string): Added cast.
	(vfy_object_type): Fixed typo.
	(vfy_string_type): Likewise.
	(vfy_throwable_type): Likewise.
	(vfy_class_type): Likewise.
	(vfy_fail): Added argument name.
	* defineclass.cc (handleCodeAttribute): Set new field.
	(MAJOR_1_1, MINOR_1_1, MAJOR_1_2, MINOR_1_2, MAJOR_1_3, MINOR_1_3,
	MAJOR_1_4, MINOR_1_4, MAJOR_1_5, MINOR_1_5): New defines.
	(parse): Check version numbers.
	(_Jv_ClassReader::is_15): New field.
	(_Jv_ClassReader): Initialize it.
	* include/java-interp.h (_Jv_InterpMethod::is_15): New field.
	(class _Jv_InterpException): Added friend class.
	(class _Jv_MethodBase): Likewise.
	(class _Jv_InterpMethod): Likewise.
	* configure, Makefile.in: Rebuilt.
	* configure.ac: Create verify.cc as a link.
	* verify.cc: Removed.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcjx/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.1.2.73&r2=1.1.2.74
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcjx/bytecode/verify.cc.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.1.2.6&r2=1.1.2.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.3285.2.5&r2=1.3285.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.465.2.2&r2=1.465.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/configure.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.250.2.1&r2=1.250.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/configure.ac.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.16.2.1&r2=1.16.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/defineclass.cc.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.43&r2=1.43.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/verify.cc.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.65&r2=NONE
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/include/java-interp.h.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.27&r2=1.27.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/include/verify.h.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.1.2.2&r2=1.1.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/lang/Class.h.diff?cvsroot=gcc&only_with_tag=gcjx-branch&r1=1.75&r2=1.75.2.1



-- 


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


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

* [Bug libgcj/16032] libgcj should reject class files with incorrect version numbers
  2004-06-17  3:51 [Bug libgcj/16032] New: libgcj should reject class files with incorrect version numbers tromey at gcc dot gnu dot org
  2004-09-16  7:17 ` [Bug libgcj/16032] " pinskia at gcc dot gnu dot org
  2005-04-17 21:07 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-15 22:02 ` cvs-commit at gcc dot gnu dot org
  2005-09-15 22:05 ` tromey at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-15 22:02 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-15 22:02 -------
Subject: Bug 16032

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tromey@gcc.gnu.org	2005-09-15 22:02:14

Modified files:
	libjava        : ChangeLog interpret.cc verify.cc defineclass.cc 
	libjava/include: java-interp.h 

Log message:
	PR libgcj/16032:
	* interpret.cc (AVAL1U): Resolve pool entry when not direct
	threaded.
	(AVAL2U): Likewise.
	(compile): Handle 'ldc class' specially.
	(_Jv_InterpMethod::run): Added special 'ldc class' instruction.
	* verify.cc (check_constant): Handle 'ldc class' for 1.5 classes.
	* defineclass.cc (handleCodeAttribute): Set new field.
	(MAJOR_1_1, MINOR_1_1, MAJOR_1_2, MINOR_1_2, MAJOR_1_3, MINOR_1_3,
	MAJOR_1_4, MINOR_1_4, MAJOR_1_5, MINOR_1_5): New defines.
	(parse): Check version numbers.
	(_Jv_ClassReader::is_15): New field.
	(_Jv_ClassReader): Initialize it.
	* include/java-interp.h (_Jv_InterpMethod::is_15): New field.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3739&r2=1.3740
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/interpret.cc.diff?cvsroot=gcc&r1=1.53&r2=1.54
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/verify.cc.diff?cvsroot=gcc&r1=1.71&r2=1.72
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/defineclass.cc.diff?cvsroot=gcc&r1=1.48&r2=1.49
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/include/java-interp.h.diff?cvsroot=gcc&r1=1.30&r2=1.31



-- 


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


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

* [Bug libgcj/16032] libgcj should reject class files with incorrect version numbers
  2004-06-17  3:51 [Bug libgcj/16032] New: libgcj should reject class files with incorrect version numbers tromey at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-09-15 22:02 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-15 22:05 ` tromey at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-09-15 22:05 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2005-09-15 22:05 -------
Fix checked in


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


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


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

end of thread, other threads:[~2005-09-15 22:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-17  3:51 [Bug libgcj/16032] New: libgcj should reject class files with incorrect version numbers tromey at gcc dot gnu dot org
2004-09-16  7:17 ` [Bug libgcj/16032] " pinskia at gcc dot gnu dot org
2005-04-17 21:07 ` cvs-commit at gcc dot gnu dot org
2005-09-15 22:02 ` cvs-commit at gcc dot gnu dot org
2005-09-15 22:05 ` 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).