File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,14 +179,20 @@ Result<executorch_flatbuffer::ExecutionPlan*> get_execution_plan(
179179 " Program validation failed: likely a corrupt file" );
180180#else
181181 ET_LOG (
182- Error ,
182+ Info ,
183183 " InternalConsistency verification requested but not available; "
184- " build with ET_ENABLE_PROGRAM_VERIFICATION=1 " );
185- return Error::NotSupported ;
184+ " falling back to Minimal verification. "
185+ " Build with ET_ENABLE_PROGRAM_VERIFICATION=1 for full verification. " ) ;
186186#endif
187- } else {
188- // Verification::Minimal: Verify that the root table offset is within
189- // bounds. This is done in InternalConsistency by VerifyProgramBuffer.
187+ }
188+
189+ if (verification == Verification::Minimal
190+ #if !ET_ENABLE_PROGRAM_VERIFICATION
191+ || verification == Verification::InternalConsistency
192+ #endif
193+ ) {
194+ // Verify that the root table offset is within bounds.
195+ // In InternalConsistency mode this is done by VerifyProgramBuffer above.
190196 uint32_t root_offset =
191197 flatbuffers::ReadScalar<flatbuffers::uoffset_t >(program_data->data ());
192198 // The root table is at buf + root_offset. It must not point into the
You can’t perform that action at this time.
0 commit comments