harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [drlvm] HARMONY-956 - problem w/ DRLVM classloader
Date Mon, 07 Aug 2006 18:13:29 GMT
On Monday 07 August 2006 22:10 Gregory Shimansky wrote:
> On Monday 07 August 2006 21:22 Anton Luht wrote:
> > Hello,
> >
> > The problem is with verifier.
> >
> > The code in Verifier.cpp:
> >
> >         if( ( start_pc >= len ) || ( end_pc >= len ) || ( handler_pc >=
> > len ) ) ...
> >
> >             result = VER_ErrorHandler;
> >
> > I've modified error logging a bit to log values of start_pc, end_pc,
> > handler_pc and len and that's the output:
> >
> >
> > Loading message broker from: xbean:activemq.xml
> > vf_debug: VerifyError: (class:
> > edu/emory/mathcs/backport/java/util/concurrent/lo
> > cks/ReentrantLock$NonfairSync, method: lockInterruptibly()V, len: 103,
> > start_pc: 87, end_pc: 103, handler_pc: 21) Handler pc is out of range
> > vf_debug: verifying class
> > edu/emory/mathcs/backport/java/util/concurrent/locks/R eentrantLock
> > (method <init>()V) couldn't load class "edu/emory/mathcs/backport/j
> > ava/util/concurrent/locks/ReentrantLock$NonfairSync"
> > vf_debug: VerifyError:
> > edu/emory/mathcs/backport/java/util/concurrent/locks/Reen
> > trantLock$NonfairSync
> > Failed to execute main task. Reason: java.lang.NoClassDefFoundError:
> > edu/emory/m
> > athcs/backport/java/util/concurrent/locks/ReentrantLock$NonfairSync
> >
> > I'm not an expert in verification but seems like
> >
> > end_pc >= len
> > should be replaced with
> > end_pc > len
>
> I checked Java class file format spec [1] and it states in 4.7.3 that:
>
> --------------------------------------------------------
> start_pc, end_pc
>     The values of the two items start_pc and end_pc indicate the ranges in
> the code array at which the exception handler is active. The value of
> start_pc must be a valid index into the code array of the opcode of an
> instruction. The value of end_pc either must be a valid index into the code
> array of the opcode of an instruction or must be equal to code_length, the
> length of the code array. The value of start_pc must be less than the value
> of end_pc.
>
>     The start_pc is inclusive and end_pc is exclusive; that is, the
> exception handler must be active while the program counter is within the
> interval [start_pc, end_pc).
> --------------------------------------------------------
>
> In this case the code length is 103 and end_pc is 103. It looks to be a
> legal exception handler entry so I agree with your correction to verifier
> code.

I forgot to place a link in footnote [1]

[1] http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html

-- 
Gregory Shimansky, Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message