triton-vm icon indicating copy to clipboard operation
triton-vm copied to clipboard

Improve VM Error Messaging

Open aszepieniec opened this issue 3 years ago • 1 comments

Bug-hunt 2aed4267c0a21d4e6b6212b263c64433abc0c0d4 identified two types of errors that can occur when running the VM.

  1. Rust produces a "failed to fill whole buffer" message. This is probably related to stdin/secret_in when you're trying to read too many or too few symbols. This kind of behavior should be caught and the programmer should be notified of it gracefully.
  2. The VM chokes gracefully because of an assert or assert_vector or similar instruction failing. When this happens, it would be nice if the error message supplied which instruction (instruction type and instruction pointer) caused it, possibly with a (jump) stack trace. Also, we will want to verify that certain programs that should fail gracefully do fail gracefully.

aszepieniec avatar Sep 13 '22 12:09 aszepieniec

Commit 03c77c5 improves the error message somewhat.

aszepieniec avatar Sep 19 '22 09:09 aszepieniec

In #159 we suggest adding both a DivisionByZero and a LogarithmOfZero error types.

sshine avatar Jan 12 '23 05:01 sshine

fixed by #241

jan-ferdinand avatar Dec 24 '23 14:12 jan-ferdinand