sled icon indicating copy to clipboard operation
sled copied to clipboard

panic reduction

Open spacejam opened this issue 5 years ago • 2 comments

gradually apply https://github.com/dtolnay/no-panic to a new test feature that just compiles optimized code and asserts that panic does not happen in a wider and wider subtree.

biggest offenders for panics right now:

  • TryFrom/TryInto errors - can be converted to ReportableBug errors
  • array indexing errors - same as above
  • result/option unwrap errors - can add try_unwrap that returns Err(ReportableBug) on failure
  • assertions - can be disabled with the no panic feature

spacejam avatar May 19 '20 10:05 spacejam

Panic-free Drop implementations might be a good intermediate goal, as a second panic during unwinding will abort

divergentdave avatar Jun 15 '20 23:06 divergentdave

@divergentdave I agree, that seems like one of the best places to start. The first module I started playing with is the serialization module, which has turned out to be a bit of work, but not necessarily challenging, and pretty important for overall safety.

spacejam avatar Jun 19 '20 10:06 spacejam