Looking at the various issues reported in this thread, it honestly seems that burning the entire codebase and rewriting it would be the best choice. Bonus points for using a modern systems programming language.
Safety in rufst is not only about memory safety. It’s also about avoiding unpredictable behavior.
reading through the report, it's not unlikely to be a race condition