[ 
http://jira.codehaus.org/browse/JIBX-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Sosnoski closed JIBX-213.
--------------------------------


> Incorrect binding code generated for long data type (Won't DUP type on stack 
> top 'long' because it must occupy exactly one slot, not '2'.)
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JIBX-213
>                 URL: http://jira.codehaus.org/browse/JIBX-213
>             Project: JiBX
>          Issue Type: Bug
>          Components: Generator Tools
>    Affects Versions: JiBX 1.1.5
>         Environment: Windows XP Pro SP2, CPU x86 Family 15 Model 4 Stepping 1 
> GenuineIntel ~3200 Mhz, RAM 2GB
> Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
>            Reporter: Serguei Ouklonski
>            Assignee: Dennis Sosnoski
>             Fix For: JiBX 1.1.6
>
>         Attachments: testcases.zip
>
>
> For simple input-only binding incorrect code is generated when "long" data 
> type is present. Identical code with "int" instead of "long" is processed 
> correctly.
> Attached is an archive containing two test cases:
>      testcases
>            bad-with-long
>                    bind
>            good-with-int
>                    bind
> "bind" is a top-level java package. InTest2 is a main class, InTest2.xml is 
> input file. 
> ---------------------------------------------------------------------------------------------------------------------
> An attempt to run "bad-with-long" variant resulted in: 
> Exception in thread "main" java.lang.VerifyError: (class: 
> bind/JiBX_MungeAdapter, method: JiBX_test_binding_in2_unmarshal_1_4 
> signature: 
> (Lbind/MyData;Lorg/jibx/runtime/impl/UnmarshallingContext;)Lbind/MyData;) 
> Attempt to split long or double on the stack
>       at bind.JiBX_test_binding_in2MyData_access1.unmarshal()
>       at 
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2537)
>       at 
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2680)
>       at bind.InTest2.main(InTest2.java:19)
> Output from "org.jibx.binding.Compile -b -l bind\test-binding-in2.xml" 
> contains (among other diagnostics):
> Verification failure on method JiBX_test_binding_in2_unmarshal_1_2 of class 
> bind.JiBX_MungeAdapter:
>   VERIFIED_REJECTED
> Instruction invokeinterface[185](5) 84 constraint violated: Referenced method 
> 'setStatus' with expected signature not found in c
> lass 'bind.MyData'. The native verfier does allow the method to be declared 
> in some superinterface, which the Java Virtual Machi
> ne Specification, Second Edition does not.
> Verification failure on method JiBX_test_binding_in2_unmarshal_1_0 of class 
> bind.JiBX_MungeAdapter:
>   VERIFIED_REJECTED
> Constraint violated in method 'public static bind.SomeData 
> JiBX_test_binding_in2_unmarshal_1_0(bind.SomeData arg1, org.jibx.runt
> ime.impl.UnmarshallingContext arg2)
>                 throws org.jibx.runtime.JiBXException':
> Instruction DUP constraint violated: Won't DUP type on stack top 'long' 
> because it must occupy exactly one slot, not '2'.
> InstructionHandle:   43: dup[89](1)
> Execution Frame:
> Local Variables:
> 0: bind.SomeData
> 1: org.jibx.runtime.impl.UnmarshallingContext
> 2: boolean[]
> 3: <unknown object>
> 4: <unknown object>
> OperandStack:
> Slots used: 4 MaxStack: 5.
> long (Size: 2)
> bind.SomeData (Size: 1)
> bind.SomeData (Size: 1)
> Execution flow:
>    0: aload_0   [InstructionContext]
>    1: iconst_1  [InstructionContext]
>    2: newarray boolean  [InstructionContext]
>    4: astore_2  [InstructionContext]
>    5: nop       [InstructionContext]
>    6: aload_1   [InstructionContext]
>    7: aconst_null       [InstructionContext]
>    8: ldc 33    [InstructionContext]
>   10: invokevirtual 37  [InstructionContext]
>   13: ifeq -> 53        [InstructionContext]
>   16: aload_2   [InstructionContext]
>   17: iconst_0  [InstructionContext]
>   18: baload    [InstructionContext]
>   19: ifeq -> 31        [InstructionContext]
>   31: aload_2   [InstructionContext]
>   32: iconst_0  [InstructionContext]
>   33: iconst_1  [InstructionContext]
>   34: bastore   [InstructionContext]
>   35: aload_0   [InstructionContext]
>   36: aload_1   [InstructionContext]
>   37: aconst_null       [InstructionContext]
>   38: ldc 33    [InstructionContext]
>   40: invokevirtual 47  [InstructionContext]
>   43: dup       [InstructionContext]
> Attached is an archive containing two test cases:
>      testcases
>            bad-with-long
>                    bind
>            good-with-int
>                    bind
> "bind" is top-level java package.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to