Hi there,
In StateLoader::LoadFile one of the final blocks has the comment "If we get errors just skip the error and continue rather than leave everything in an unstable state." When the reloc is corrupted sure, but the logic in this block seems to ignore errors in some places it shouldn't. In particular, shouldn't we return false when the initial fseek fails [0] or when an fread fails [1]? It seems to me that continuing in these cases causes us to either read garbage or an uninitialised stack variable. Am I missing something here?
Thanks, Matt
[0]: https://github.com/polyml/polyml/blob/master/libpolyml/savestate.cpp#L1051 [1]: https://github.com/polyml/polyml/blob/master/libpolyml/savestate.cpp#L1058