ion_reader_next indicates the end of a container by setting the passed ION_TYPE reference to tid_EOF, regardless of whether the end of that container was expected (and the container valid) or the stream incomplete.
When a caller attempts to step out of the container, the ION_ASSERT condition in _ion_reader_binary_step_out is true. Depending on whether ion-c is built in debug or release this may result in a failed assertion or an infinite loop.
It seems totally reasonable for me as a user that I should be able to try to step out of the container in this case, and reliably get an error in the case of premature stream end.
This is the apparent cause of amazon-ion/ion-python#398