Re: [Aegisvm-devel] bug fix (divide by zero)
Status: Pre-Alpha
Brought to you by:
pwlfong
From: Philip F. <pw...@us...> - 2002-10-09 19:02:02
|
Hi I just committed your patch to the CVS repository with the following log: Bug fix: Division by zero is now properly handled in idiv/irem/ldiv/lrem. The fix is contributed by madhatter <mad...@al...>. The committed code is basically the same as yours, except for minor stylistic adjustment. I also added in some simple test scripts for trying out your code. Attached is the actual diff that I committed. Thanks for contributing. Philip On Tue, 8 Oct 2002, madhatter wrote: > Hi, attached is a patch that does a divide by zero check, and if necessary throws an ArithmeticException on all division opcodes. It's also at http://www.alpha-beta.org/madhatter/aegisvm.div_ArithmeticException.diff if you want to get it there. Um, the code is directly in the inner loop of ae_interpret_bytecode, which might not be what you want, since it's the same code written twice for each data type (division and remainder ops), if you want me to implement it as a macro that's fine. I hope to do more with AegisVM, let me know. > > > -- Philip W. L. Fong pw...@us... The Aegis VM Project http://aegisvm.sourceforge.net The Aegis VM Project is an on-going effort to implement a lightweight, secure JVM. It will eventually feature a modular architecture, Proof Linking, that supports pluggable verification modules. |