diff options
author | Erlang/OTP <[email protected]> | 2017-07-25 09:47:00 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2017-07-25 09:47:00 +0200 |
commit | e3120fa69cc5ff7e083a571ba8c8bf7650dbfc36 (patch) | |
tree | f61d63d4ef04922110ffd7b5d9a850cba1c54efd /erts/emulator/beam | |
parent | 82bdb296dd86005efaced7f0cadd385b67629603 (diff) | |
parent | abc4fd372d476821448dfb949bea4e28ab82ac26 (diff) | |
download | otp-e3120fa69cc5ff7e083a571ba8c8bf7650dbfc36.tar.gz otp-e3120fa69cc5ff7e083a571ba8c8bf7650dbfc36.tar.bz2 otp-e3120fa69cc5ff7e083a571ba8c8bf7650dbfc36.zip |
Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maint-19
* 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 4baee7900b..27064a4fd6 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++; } } } |