projects
/
jpf-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
87c80d1
)
Merge branch 'master' of https://github.com/javapathfinder/jpf-core
author
Vaibhav Sharma
<vaibhav@umn.edu>
Wed, 24 Jan 2018 03:09:28 +0000
(21:09 -0600)
committer
Vaibhav Sharma
<vaibhav@umn.edu>
Wed, 24 Jan 2018 03:09:28 +0000
(21:09 -0600)
src/main/gov/nasa/jpf/jvm/bytecode/DDIV.java
patch
|
blob
|
history
diff --git
a/src/main/gov/nasa/jpf/jvm/bytecode/DDIV.java
b/src/main/gov/nasa/jpf/jvm/bytecode/DDIV.java
index 4c20b68dbda931fbeaccea80ae372712790d5b2e..c14099be1e54b550c0025fcfbd141ca2dc014957 100644
(file)
--- a/
src/main/gov/nasa/jpf/jvm/bytecode/DDIV.java
+++ b/
src/main/gov/nasa/jpf/jvm/bytecode/DDIV.java
@@
-35,6
+35,11
@@
public class DDIV extends Instruction implements JVMInstruction {
double v1 = frame.popDouble();
double v2 = frame.popDouble();
+ if (v1 == 0) {
+ return ti.createAndThrowException("java.lang.ArithmeticException",
+ "division by zero");
+ }
+
double r = v2 / v1;
frame.pushDouble(r);