[ 
https://issues.apache.org/jira/browse/DAFFODIL-2703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17552820#comment-17552820
 ] 

John Interrante commented on DAFFODIL-2703:
-------------------------------------------

Steve, I think you're right on both counts.  I expanded unalignedRightFill.tdml 
to unalignedRightFills.tdml (plural, attached below) with multiple roots having 
different fill bytes for each root (00, 0F, F0, FF), using %#r instead of %#x, 
and using unsignedInt instead of int:

[^unalignedRightFills.tdml]

With runtime1, all tests pass.  With runtime2, only the 00 tests pass.  And the 
%#x syntax definitely produces different actual values, probably meaning the 
literals don't have the same values as the %#r syntax.

{noformat}
interran@GH3WPL13E:~$ daffodil test -I daffodil unalignedRightFills.tdml
[Pass] fill00_0
[Pass] fill00_1
[Pass] fill0F_0
[Pass] fill0F_1
[Pass] fillF0_0
[Pass] fillF0_1
[Pass] fillFF_0
[Pass] fillFF_1

Total: 8, Pass: 8, Fail: 0, Not Found: 0
interran@GH3WPL13E:~$ daffodil test -I daffodilC unalignedRightFills.tdml
[Pass] fill00_0
[Pass] fill00_1
[Fail] fill0F_0
[Fail] fill0F_1
[Fail] fillF0_0
[Fail] fillF0_1
[Fail] fillFF_0
[Fail] fillFF_1

Total: 8, Pass: 2, Fail: 6, Not Found: 0{noformat}
 

> Unaligned RightFill does not unparse correctly
> ----------------------------------------------
>
>                 Key: DAFFODIL-2703
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2703
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, Back End C-Generator
>    Affects Versions: 3.3.0
>            Reporter: Steve Lawrence
>            Priority: Major
>         Attachments: unalignedRightFill.tdml, unalignedRightFills.tdml
>
>
> See the attached unalignedRightFill.tdml file for reproducible tests.
> Data is a single byte. Only the most significant bit is actual data. The 
> remaining 7 bits are RightFill region using a fillByte value of 0xF0. So the 
> data should always unparse to X111 0000, where the value of X comes from the 
> infoset.
> Note that runtime1 and runtime2 have different behaviors, neither of which I 
> think is correct:
>  
>  
> *unalignedRightFill_01* (bit from infoset is 1)
> should unparse to 0xF0 (1111 0000)
> runtime1 unparses to 0xBF (1011 1111)
> runtime2 unparses to 0x9F (1001 1111)
>  
> *unalignedRightFill_02* (bit from infoset is 0)
> should unparse to 0x70 (0111 0000)
> runtime1 unaprses to 0x3F (0011 1111)
> runtime2 unparses to 0x1F (0001 1111)



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to