diff options
author | Sverker Eriksson <[email protected]> | 2017-07-13 17:52:00 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-07-13 17:52:00 +0200 |
commit | baa2a2a292f9b66c343a7d5ac1835b3af2e5bb3d (patch) | |
tree | b0d5348e68963621608752149ac859fa96bcfa0f /erts/emulator/beam | |
parent | 4ac0e889944d9529e7904e61700e1205d166ca19 (diff) | |
parent | abc4fd372d476821448dfb949bea4e28ab82ac26 (diff) | |
download | otp-baa2a2a292f9b66c343a7d5ac1835b3af2e5bb3d.tar.gz otp-baa2a2a292f9b66c343a7d5ac1835b3af2e5bb3d.tar.bz2 otp-baa2a2a292f9b66c343a7d5ac1835b3af2e5bb3d.zip |
Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maint
* 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.c | 11 |
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++; } } } |