Error in changed bytecode

Jayanga Wagaarachchi <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <CAFCfdqxSPwigoCvsOoWzkCeoaeV5ZABYsZNkaGvpqVtWNbT92A@mail.gmail.com>
Hi,

I am having a confusing error when I tried to add some code to calculate
time consumed by a section of method. I am adding some bytecodes. But when I
run the changed program I receive an error An unexpected error has been
detected by Java Runtime Environmen# EXCEPTION_ACCESS_VIOLATION
(0xc0000005)# Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode,
sharing)

Then I tried to analyze the code using *CheckClassAdapter. *when I am trying
to verify the code it shows me an error in the changed byte code as Expected
J, but found . I figured this is caused when accessing uninitialized
variable.  here is a part of output from CheckClassAdapter

00072 LOriginal; [[I [[I [[I I I I . . . J . . . . .  :  :    L1
00073 LOriginal; [[I [[I [[I I I I . . . J . . . . .  :  :    FRAME FULL
[Original [[I [[I [[I I I I T T T J] []
00074 LOriginal; [[I [[I [[I I I I . . . J . . . . .  :  :     INVOKESTATIC
java/lang/System.nanoTime ()J
00075 LOriginal; [[I [[I [[I I I I . . . J . . . . .  : J  :     LSTORE 11
00076 LOriginal; [[I [[I [[I I I I . . . . J . . . .  :  :     LLOAD 11
00077 LOriginal; [[I [[I [[I I I I . . . . J . . . .  : J  :     LLOAD 10
00078 ?                       :     LSUB

Here if you look at the instruction 75 which is LSTORE 11 at that point I
have already added anther long value initialized and stored at position 10.
But when the LSTORE 11 executes the long value at the position 10 disappears
causing the above mentioned error at instruction 77. Isn't this confusing? I
am stuck at this point because I cant find any reason why this happens.

Can you show me what is wrong here?
Thank you.
-- 
Jayanga Wagaarachchi
Computer Science and Engineering
University of Moratuwa.
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.