diff options
author | Erlang/OTP <[email protected]> | 2017-11-15 14:39:56 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2017-11-15 14:39:56 +0100 |
commit | 7ca3c4e7a37c71a327feaec60128329b48e51436 (patch) | |
tree | 1019120d99233ded0d0f274d45998b16d50683a5 /erts/emulator/beam/big.c | |
parent | be217eca99db612279f889eaf2a4e31c44494292 (diff) | |
parent | abc4fd372d476821448dfb949bea4e28ab82ac26 (diff) | |
download | otp-7ca3c4e7a37c71a327feaec60128329b48e51436.tar.gz otp-7ca3c4e7a37c71a327feaec60128329b48e51436.tar.bz2 otp-7ca3c4e7a37c71a327feaec60128329b48e51436.zip |
Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maint-18
* sverker/big-bxor-bug/ERL-450/OTP-14514:
erts: Fix bug in bxor of a big negative number
Diffstat (limited to 'erts/emulator/beam/big.c')
-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 87d3be2b0f..6513cbb58d 100644 --- a/erts/emulator/beam/big.c +++ b/erts/emulator/beam/big.c @@ -1274,8 +1274,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; @@ -1293,7 +1296,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++; } } } |