404-not-find / orika

Automatically exported from code.google.com/p/orika
2 stars 0 forks source link

Using Javassist 3.18.1-GA in combination with Orika 1.4.5 causes "java.lang.VerifyError: Stack map does not match the one at exception handler ..." #156

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This works correctly with either Javassist 3.16.1-GA or by using an older 
version of Orika (1.4.2) works.

Looking at the generated source, the issue seems to stem from the try { stuff } 
finally { } added in commit: 
https://github.com/orika-mapper/orika/commit/9594110248667b4274829ad277afb38d4b7
87c60#diff-05350f00dce1671fcfe6379ec6b510bd though subsequently updated.

The full trace is below:

java.lang.VerifyError: Stack map does not match the one at exception handler 854
Exception Details:
  Location:
    ma/glasnost/orika/generated/Orika_DestObject_SourceObject_Mapper1396862622309939000$18.mapAtoB(Ljava/lang/Object;Ljava/lang/Object;Lma/glasnost/orika/MappingContext;)V @854: astore
  Reason:
    Type 'java/lang/String' (current frame, locals[9]) is not assignable to null (stack map, locals[9])
  Current Frame:
    bci: @833
    flags: { }
    locals: { 'ma/glasnost/orika/generated/Orika_DestObject_SourceObject_Mapper1396862622309939000$18', 'java/lang/Object', 'java/lang/Object', 'ma/glasnost/orika/MappingContext', 'something/SourceObject', 'something/else/DestObject', top, top, 'java/util/List', 'java/lang/String', integer, 'java/util/Iterator', 'something/common/SourceSubObject' }
    stack: { 'java/lang/Throwable' }
  Stackmap Frame:
    bci: @854
    flags: { }
    locals: { 'ma/glasnost/orika/generated/Orika_DestObject_SourceObject_Mapper1396862622309939000$18', 'java/lang/Object', 'java/lang/Object', 'ma/glasnost/orika/MappingContext', 'something/SourceObject', 'something/else/DestObject', top, top, 'java/util/List', null, integer, 'java/util/Iterator', 'something/common/SourceSubObject' }
    stack: { 'java/lang/Throwable' }
  Bytecode:
    0000000: 2a2b 2c2d b700 0c2b c000 0e3a 042c c000
    0000010: 103a 0519 04b6 0014 c000 1601 a500 1319
    0000020: 0519 04b6 0014 c000 16b6 001a b600 1e19
    0000030: 04b6 0022 c000 2401 a500 2d19 052a b400
    0000040: 2a03 32c0 002c 1904 b600 22c0 0024 2ab4
    0000050: 0030 0332 c000 32b9 0036 0300 c000 38b6
    0000060: 003c a700 0919 0501 b600 3c19 0519 04b6
    0000070: 0041 c000 24b6 0045 1904 b600 49c0 004b
    0000080: 01a5 0052 bb00 4d59 1904 b600 49c0 004b
    0000090: b900 5101 00b7 0055 c000 4b3a 0619 062a
    00000a0: b400 5919 04b6 0049 c000 4b2a b400 3004
    00000b0: 32c0 0032 2ab4 0030 0532 c000 322d b900
    00000c0: 5f05 00b9 0063 0200 5719 0519 06b6 0067
    00000d0: a700 1519 05b6 0068 c000 4b01 a500 0919
    00000e0: 0501 b600 6719 04b6 006c c000 6e01 a500
    00000f0: 5b19 05b6 0071 c000 7301 a600 2519 052a
    0000100: b400 7703 32c0 0079 1904 b600 6cc0 006e
    0000110: 2db9 007d 0300 c000 73b6 0081 a700 2a19
    0000120: 052a b400 7703 32c0 0079 1904 b600 6cc0
    0000130: 006e 1905 b600 71c0 0073 2db9 0084 0400
    0000140: c000 73b6 0081 a700 0919 0501 b600 8119
    0000150: 04b6 0088 c000 8a01 a500 2d19 052a b400
    0000160: 2a04 32c0 002c 1904 b600 88c0 008a 2ab4
    0000170: 0030 0632 c000 32b9 0036 0300 c000 8cb6
    0000180: 0090 a700 0919 0501 b600 9019 04b6 0094
    0000190: c000 9601 a500 2d19 052a b400 2a05 32c0
    00001a0: 002c 1904 b600 94c0 0096 2ab4 0030 0732
    00001b0: c000 32b9 0036 0300 c000 24b6 0099 a700
    00001c0: 0919 0501 b600 9919 04b6 009c c000 4b01
    00001d0: a500 53bb 004d 5919 04b6 009c c000 4bb9
    00001e0: 0051 0100 b700 55c0 004b 3a07 1907 2ab4
    00001f0: 0059 1904 b600 9cc0 004b 2ab4 0030 0832
    0000200: c000 322a b400 3010 0632 c000 322d b900
    0000210: 5f05 00b9 0063 0200 5719 0519 07b6 009f
    0000220: a700 1519 05b6 00a0 c000 4b01 a500 0919
    0000230: 0501 b600 9f19 04b6 00a3 c000 6e01 a500
    0000240: 5b19 05b6 00a5 c000 7301 a600 2519 052a
    0000250: b400 7703 32c0 0079 1904 b600 a3c0 006e
    0000260: 2db9 007d 0300 c000 73b6 00a8 a700 2a19
    0000270: 052a b400 7703 32c0 0079 1904 b600 a3c0
    0000280: 006e 1905 b600 a5c0 0073 2db9 0084 0400
    0000290: c000 73b6 00a8 a700 0919 0501 b600 a819
    00002a0: 0519 04b6 00ab c000 24b6 00ae 013a 0819
    00002b0: 04b6 00b1 c000 4b01 a500 29bb 004d 592a
    00002c0: 04bc 0a59 0319 04b6 00b1 c000 4bb9 0051
    00002d0: 0100 4fb6 00b5 b700 55c0 004b 3a08 a700
    00002e0: 0601 3a08 013a 0903 360a 1904 b600 b1c0
    00002f0: 004b 01a5 007a 1904 b600 b1c0 004b b900
    0000300: b901 003a 0ba7 005e 190b b900 bf01 00c0
    0000310: 00c1 3a0c 0436 0a2d 2ab4 0030 1007 32c0
    0000320: 0032 1904 b600 b1c0 004b 2ab4 0030 1008
    0000330: 32c0 0032 1908 b600 c719 0cb6 00ca c000
    0000340: 243a 0919 0819 09c0 0024 b900 ce02 0057
    0000350: 013a 09a7 000c 3a0d 2db6 00d2 190d bf2d
    0000360: b600 d219 0bb9 00d5 0100 9aff 9e19 0801
    0000370: a500 0d19 08b9 00d8 0100 9900 06a7 0055
    0000380: 1905 b600 dbc0 004b 01a6 002c 1905 bb00
    0000390: 4d59 2a04 bc0a 5903 1904 b600 b1c0 004b
    00003a0: b900 5101 004f b600 b5b7 0055 c000 4bb6
    00003b0: 00de a700 1019 05b6 00db c000 4bb9 00e1
    00003c0: 0100 1905 b600 dbc0 004b 1908 b900 6302
    00003d0: 0057 2ab4 00e5 01a5 0011 2ab4 00e5 1904
    00003e0: 1905 2db9 00e8 0400 b1                 
  Exception Handler Table:
    bci [825, 854] => handler: 854
  Stackmap Table:
    append_frame(@47,Object[#14],Object[#16])
    same_frame(@101)
    same_frame(@107)
    same_frame_extended(@211)
    same_frame(@229)
    same_frame(@287)
    same_frame(@326)
    same_frame(@329)
    same_frame(@335)
    same_frame(@389)
    same_frame(@395)
    same_frame(@449)
    same_frame(@455)
    same_frame_extended(@547)
    same_frame(@565)
    same_frame(@623)
    same_frame(@662)
    same_frame(@665)
    same_frame(@671)
    append_frame(@737,Top,Top,Null)
    full_frame(@740,{Object[#2],Object[#4],Object[#4],Object[#195],Object[#14],Object[#16],Top,Top,Object[#75]},{})
    append_frame(@776,Null,Integer,Object[#187])
    full_frame(@854,{Object[#2],Object[#4],Object[#4],Object[#195],Object[#14],Object[#16],Top,Top,Object[#75],Null,Integer,Object[#187],Object[#193]},{Object[#235]})
    same_frame(@863)
    chop_frame(@867,1)
    chop_frame(@877,1)
    same_frame(@893)
    same_frame(@896)
    same_frame(@949)
    same_frame(@962)
    same_frame(@978)
    same_frame(@1000)

Original issue reported on code.google.com by andrewwt...@gmail.com on 7 Apr 2014 at 9:32

GoogleCodeExporter commented 8 years ago
Thanks for this report !

Original comment by elaat...@gmail.com on 7 Apr 2014 at 9:36