In the function UE::NNERuntimeIREE::CPU::Private::FSession::RunSyncCPUInternal (NNERutimeIREEModel.cpp), in the loop that handles the model outputs at the end of the function, there are three calls to the function iree_hal_buffer_view_destroy (one for normal successful operation and two for cleanup on error). The function is called to destroy the buffer view object previously retrieved from the outputs list. However, the buffer view is a reference-counted type, and iree_hal_buffer_view_destroy will destroy it regardless of the reference count. In typical cases the buffer view will only have the one reference at hand, but in some cases (for example, if an output is repeated) the count may be greater than one, which can cause an invalid memory access later. It seems that the function iree_hal_buffer_view_release should be used instead, which decreases the reference count and only destroys the buffer view if it is the last reference to it. iree_hal_buffer_view_release is in fact already used in other places in the same file.
As an additional note, there is another surprising bit code in that same section. The condition `if (InOutputBindings[i].SizeInBytes <= DataSizeInBytes)` suggests the output will only be copied to the buffer if it has the required space or less. Perhaps this was meant to be `>=` or just `==`, as at the moment it looks like the following call `Device->CopyFromBuffer(Buffer, InOutputBindings[i].Data, DataSizeInBytes)` will attempt to write beyond the extents of the buffer if its size is smaller than `DataSizeInBytes`.