[
https://issues.apache.org/jira/browse/DAFFODIL-2586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17444780#comment-17444780
]
Steve Lawrence commented on DAFFODIL-2586:
------------------------------------------
Tracke the issue down to the xAttribureValue function in scala-xml:
[https://github.com/scala/scala-xml/blob/main/shared/src/main/scala/scala/xml/parsing/MarkupParserCommon.scala#L69]
If an attribute contains '<' (which it does in this case if you don't close it
properly) then scala-xml calls the reportSyntaxError function. If that function
returns, then scala-xml gets stuck in an infinite loop, repeatedly calling this
function. It isn't clear if this is a bug in scala-xml and it should be
aborting the parse if there's a syntax error, or if our overridden
reportSyntaxError function should be throwing an exception to cause parsing to
stop.
> Schema compilation hangs if incorrectly closed attribute
> --------------------------------------------------------
>
> Key: DAFFODIL-2586
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2586
> Project: Daffodil
> Issue Type: Bug
> Components: Front End
> Affects Versions: 3.2.0
> Reporter: Steve Lawrence
> Priority: Major
> Labels: beginner
>
> Notice below the missing quote with the last attribute of the dfdl:format
> element. When I parse a DFDL schema containing this dfdl:format element,
> Daffodil hangs forever.
> {code:xml}
> <xs:annotation>
> <xs:appinfo source="http://www.ogf.org/dfdl/">
> <dfdl:format
> textBidi="no"
> separatorSuppressionPolicy="trailingEmpty"
> floating="no"
> encodingErrorPolicy="replace"
> outputNewLine="%CR;%LF;"
> leadingSkip="0"
> trailingSkip="0"
> alignment="1"
> alignmentUnits="bytes"
> textPadKind="none"
> textTrimKind="none"
> truncateSpecifiedLengthString="no"
> escapeSchemeRef=""
> representation="binary"
> encoding="ASCII"
> separator = ""
> initiator = ""
> terminator = ""
> ignoreCase = "yes"
> sequenceKind="ordered"
> initiatedContent="no"
> fillByte="%SP;"
> lengthKind="implicit"
> byteOrder="littleEndian
> />
> </xs:appinfo>
> </xs:annotation>
> {code}
> Debugging a little bit, it looks like reportSyntaxError is getting called
> repeatedly with the same error message:
> {quote}
> '<' not allowed in attrib value
> {quote}
> Might be a bug in scala-xml, or might be a bug in our implementation of
> DaffodilConstructingLoader.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)