RE: Removing Length Check for Complex Types

2020-09-23 Thread Carlson, Ian
ber 23, 2020 2:06 PM To: dev@daffodil.apache.org<mailto:dev@daffodil.apache.org> Subject: Re: Removing Length Check for Complex Types I think there is an issue here. isBitLengthOk is defined as val isLimitOk: Boolean = dis.withBitLengthLimit(nBits) { eParser.parse1(pState) } Assert.invariant(is

Re: Removing Length Check for Complex Types

2020-09-23 Thread Beckerle, Mike
ting the end of the 64 bits. So I think a parse error just because dis.withBitLengthLimit returned false is likely not correct. From: Steve Lawrence Sent: Wednesday, September 23, 2020 7:39 AM To: dev@daffodil.apache.org Subject: Re: Removing Length Check for C

Re: Removing Length Check for Complex Types

2020-09-23 Thread Steve Lawrence
I'd be interested to hear others thoughts, but this sounds like the right behavior to me. The use of isDefinedForLength for complex types is flawed--it is very reasonable for complex types to be too large to cache so we cannot call it to immediately determine if enough data exists for a complex ty

Removing Length Check for Complex Types

2020-09-22 Thread Carlson, Ian
While pursuing 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