aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2017-07-26 11:46:17 +0200
committerErlang/OTP <[email protected]>2017-07-26 11:46:17 +0200
commitd3b7a6fe8392f4fe2c58b3fb4eb0adcc62367d06 (patch)
treefcd77cf25ea6c165ffcea0f2fbbac2851dfdc78c /erts/emulator/beam
parent58230a97acd71b45f048acc3fb895f9bdf9f0f46 (diff)
parentabc4fd372d476821448dfb949bea4e28ab82ac26 (diff)
downloadotp-d3b7a6fe8392f4fe2c58b3fb4eb0adcc62367d06.tar.gz
otp-d3b7a6fe8392f4fe2c58b3fb4eb0adcc62367d06.tar.bz2
otp-d3b7a6fe8392f4fe2c58b3fb4eb0adcc62367d06.zip
Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maint-20
* sverker/big-bxor-bug/ERL-450/OTP-14514: erts: Fix bug in bxor of a big negative number
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/big.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c
index 7128b8ed23..5eaf262cd8 100644
--- a/erts/emulator/beam/big.c
+++ b/erts/emulator/beam/big.c
@@ -1293,8 +1293,11 @@ static dsize_t I_bxor(ErtsDigit* x, dsize_t xl, short xsgn,
*r++ = ~c ^ *y++;
x++;
}
- while(xl--)
- *r++ = ~*x++;
+ while(xl--) {
+ DSUBb(*x,0,b,c);
+ *r++ = ~c;
+ x++;
+ }
}
else {
ErtsDigit b1, b2;
@@ -1312,7 +1315,9 @@ static dsize_t I_bxor(ErtsDigit* x, dsize_t xl, short xsgn,
x++; y++;
}
while(xl--) {
- *r++ = *x++;
+ DSUBb(*x,0,b1,c1);
+ *r++ = c1;
+ x++;
}
}
}