stevedlawrence opened a new pull request, #827: URL: https://github.com/apache/daffodil/pull/827
Currently we are very pessimistic about specifying a known length of a simple type suspension by always returning Nope (i.e. there is no known length). This meant that it was impossible to determine the absolute starting position of split buffers from those suspensions. And because absolute bit positions are so important for allowing suspensions to evaluate (e.g. alignment, length calculations) it increased the chance that a suspension would deadlock. To resolve this issue, this modifies the simple type suspension to use the actual length where possible. This isn't always possible, like when padding or right fill might be needed, but that often isn't the case. Even with that change, the absolute starting positions could not be calculated for a new split in cases where the current DOS did not have an absolute position and only had a relative position. This meant deadlocks were still fairly likely. So in these cases, we calculate and store the length of the DOS (relative bit position + suspension length). Once the absolute starting position of the DOS it determined, we can use that length to set the starting absolute position of the following DOS. Also add an assert to ensure that these new length calculations are correct by checking that the ending bit position of one DOS matches the starting bit position of the next DOS when merging. This discovered unit tests with an off by one error. These changes increase the chance of an absolute starting bit position being known and allows more suspensions to be evaluated which should lead to less deadlocks. Unrelated, remove println from a previous commit that was used for debugging and accidentally made it into the commit. DAFFODIL-2717 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
