public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Obsolete/incorrect assertion in natVMClassLoader.cc?
@ 2009-04-27 13:39 Dave Korn
  2009-04-27 22:16 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Korn @ 2009-04-27 13:39 UTC (permalink / raw)
  To: java-patches


  Testing --enable-libgcj-debug, I've been running into this assertion:

> 
> spawn [open ...]
> libgcj failure: klass->state == JV_STATE_LOADED
>    in function defineClass, file
> /gnu/gcc/gcc/libjava/java/lang/natVMClassLoader.cc, line 99
> FAIL: ExtraClassLoader execution - source compiled test


  According to an old post on the subject:

    http://gcc.gnu.org/ml/java/2005-07/msg00004.html

"The assertion is wrong".  Am I right in taking it to mean that after calling
DefineClass, the class state is indeed *supposed* to be JV_STATE_READ (as it
in fact is, having just been processed by _Jv_ClassReader::parse), rather than
JV_STATE_LOADED (which the assertion tests for)?

    cheers,
      DaveK

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

* Re: Obsolete/incorrect assertion in natVMClassLoader.cc?
  2009-04-27 13:39 Obsolete/incorrect assertion in natVMClassLoader.cc? Dave Korn
@ 2009-04-27 22:16 ` Tom Tromey
  2009-04-28  3:49   ` Dave Korn
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2009-04-27 22:16 UTC (permalink / raw)
  To: Dave Korn; +Cc: java-patches

>>>>> "Dave" == Dave Korn <dave.korn.cygwin@googlemail.com> writes:

Dave>   According to an old post on the subject:
Dave>     http://gcc.gnu.org/ml/java/2005-07/msg00004.html

Dave> "The assertion is wrong".  Am I right in taking it to mean that
Dave> after calling DefineClass, the class state is indeed *supposed*
Dave> to be JV_STATE_READ (as it in fact is, having just been
Dave> processed by _Jv_ClassReader::parse), rather than
Dave> JV_STATE_LOADED (which the assertion tests for)?

Yes, I think so.
If you want to fix or delete the assertion, go right ahead :)

Tom

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

* Re: Obsolete/incorrect assertion in natVMClassLoader.cc?
  2009-04-27 22:16 ` Tom Tromey
@ 2009-04-28  3:49   ` Dave Korn
  2009-04-28  3:50     ` Dave Korn
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Korn @ 2009-04-28  3:49 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Dave Korn, java-patches

Tom Tromey wrote:

> If you want to fix or delete the assertion, go right ahead :)

  I interpreted that as pre-approval (please, correct me if I was wrong) and
applied the obvious fix with this changelog:

libjava/ChangeLog

	* java/lang/natVMClassLoader.cc
	(java::lang::VMClassLoader::defineClass):  Fix assert.


... after verifying that doing so stopped the asserts from firing.

    cheers,
      DaveK

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

* Re: Obsolete/incorrect assertion in natVMClassLoader.cc?
  2009-04-28  3:49   ` Dave Korn
@ 2009-04-28  3:50     ` Dave Korn
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Korn @ 2009-04-28  3:50 UTC (permalink / raw)
  To: Dave Korn; +Cc: Tom Tromey, java-patches

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

Dave Korn wrote:
> applied the obvious fix 

  Obvious it may be, but why don't I attach the patch anyway? ;-)

    cheers,
      DaveK

[-- Attachment #2: pr38892-part-3.diff --]
[-- Type: text/x-c, Size: 474 bytes --]

Index: java/lang/natVMClassLoader.cc
===================================================================
--- java/lang/natVMClassLoader.cc	(revision 146867)
+++ java/lang/natVMClassLoader.cc	(working copy)
@@ -96,7 +96,7 @@ java::lang::VMClassLoader::defineClass (java::lang
 	}
 
       // if everything proceeded sucessfully, we're loaded.
-      JvAssert (klass->state == JV_STATE_LOADED);
+      JvAssert (klass->state == JV_STATE_READ);
     }
 #endif // INTERPRETER
 

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

end of thread, other threads:[~2009-04-28  3:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-27 13:39 Obsolete/incorrect assertion in natVMClassLoader.cc? Dave Korn
2009-04-27 22:16 ` Tom Tromey
2009-04-28  3:49   ` Dave Korn
2009-04-28  3:50     ` Dave Korn

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).