While pursuing 
DAFFODIL-2395<https://issues.apache.org/jira/browse/DAFFODIL-2395>, I 
experimented with SpecifiedLengthParsers.scala, specifically the check 
isDefinedForLength. I added logic to only do this check for non-complex types 
so we wouldn’t look ahead across types that might be so large that it breaks 
our backtracking.

This immediately caused problems with the Assert.invariant(isLimitOk). It 
appears that isLimitOk can now be false when the parser backtracks on points of 
uncertainty. As an attempted fix, I replaced the assert with a processing error 
for complexTypes.

This causes some 50 tests to fail with new parse error messages, presumably 
because we aren’t backtracking in the same way as before.

This seems like it might require some additional thought, so I wanted to get 
more eyes on the problem. Does the above solution make sense, or do these 
results spark any new opinions?

[A picture containing object, clock  Description automatically generated]       
   Ian Carlson | Software Engineer
[Owl Cyber Defense]
W  icarl...@owlcyberdefense.com<https://owlcyberdefense.com/>
Connect with us!
Facebook<https://www.facebook.com/owlcyberdefense/> | 
LinkedIn<https://www.linkedin.com/company/owlcyberdefense/> | 
Twitter<https://twitter.com/owlcyberdefense>

[Find us at our next event. Click 
Here.]<https://owlcyberdefense.com/resources/events/?utm_source=owl-cyber-defense&utm_medium=email&utm_content=banner&utm_campaign=2020-events>

The information contained in this transmission is for the personal and 
confidential use of the individual or entity to which it is addressed.
If the reader is not the intended recipient, you are hereby notified that any 
review, dissemination, or copying of this communication is strictly prohibited.
If you have received this transmission in error, please notify the sender 
immediately


Reply via email to