triton-vm
                                
                                
                                
                                    triton-vm copied to clipboard
                            
                            
                            
                        Improve VM Error Messaging
Bug-hunt 2aed4267c0a21d4e6b6212b263c64433abc0c0d4 identified two types of errors that can occur when running the VM.
- 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. - The VM chokes gracefully because of an 
assertorassert_vectoror 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. 
Commit 03c77c5 improves the error message somewhat.
In #159 we suggest adding both a DivisionByZero and a LogarithmOfZero error types.
fixed by #241