Mike Beckerle created DAFFODIL-2295:
---------------------------------------
Summary: priorAlignmentApprox incorrect if term is preceded by
separator with text bit alignment
Key: DAFFODIL-2295
URL: https://issues.apache.org/jira/browse/DAFFODIL-2295
Project: Daffodil
Issue Type: Bug
Components: Middle "End"
Affects Versions: 2.5.0
Reporter: Mike Beckerle
Fix For: 3.0.0
The AlignedMixin trait has a member priorAlignmentApprox which for a term,
computes an approximation of the alignment prior to it.
One of the things that could be before a term is a separator of a separated
sequence (prefix or infix position), and in that case, the alignment will be
the mandatory-text-alignment of that separator's encoding.
The code of priorAlignmentApprox takes a number of things into consideration,
but does not take the possibility of a separator into account.
The design note
[https://daffodil.apache.org/dev/design-notes/term-sharing-in-schema-compiler/]
shows numerous things in the "unique before" of a term including the separator
text regions, but the code doesn't implement this fully.
This is a bug, because the schema compiler may not insert an alignment region
when one is required to meet the term's alignment property requirement.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)