You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "stevedlawrence (via GitHub)" <gi...@apache.org> on 2024/03/28 16:19:39 UTC

[PR] Allow backtracking when parsing prefix length fails with prefixIncludesPrefixLength [daffodil]

stevedlawrence opened a new pull request, #1198:
URL: https://github.com/apache/daffodil/pull/1198

   > [!NOTE]  
   > This might want to wait until 3.8.0 or a later release where we can fix all the prefix length issues 
   
   If parsing a prefix length fails, we just pretend the value was zero and rely on callers to check the processor status and ignore the zero value if it failed. However, even if the parse fails we still do the negative prefix length SDE checks. And if the prefix has an adjustment due to the prefixIncludesPrefixLength property, that zero is a adjusted to become negative and causes an SDE instead of a PE.
   
   Really, we shouldn't do these SDE checks at all if we failed to parse a prefix length since the zero is meaningless and should be ignored. This rearranges the logic so we only check for negative prefix values if the prefix parse actually succeeded.
   
   This also skips calculating contentLength/valueLength if the parse fails.
   
   DAFFODIL-2688


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Allow backtracking when parsing prefix length fails with prefixIncludesPrefixLength [daffodil]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence commented on PR #1198:
URL: https://github.com/apache/daffodil/pull/1198#issuecomment-2025845051

   This isn't a backwards compatibility issue, and it is a fairly minor bug. I have no strong preference whether it goes in 3.7 or the next.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Allow backtracking when parsing prefix length fails with prefixIncludesPrefixLength [daffodil]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence merged PR #1198:
URL: https://github.com/apache/daffodil/pull/1198


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org