diff options
author | Kevin Backhouse <kevinbackhouse@github.com> | 2022-07-12 19:48:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-12 11:48:10 -0700 |
commit | 8c1808151f4c1b44e8b0fe935c571f05b2641b8b (patch) | |
tree | ed7dc9e5aac6945cae8df53e3f3ec1df6e120319 /include/ruby | |
parent | 8309b1366c3307ab8d9cda5b61b91540cf6cc8aa (diff) | |
download | ruby-8c1808151f4c1b44e8b0fe935c571f05b2641b8b.tar.gz |
Fix some UBSAN false positives (#6115)
* Fix some UBSAN false positives.
* ruby tool/update-deps --fix
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/internal/arithmetic/long.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/internal/arithmetic/long.h b/include/ruby/internal/arithmetic/long.h index 792f7be179..6b8fd8ffc3 100644 --- a/include/ruby/internal/arithmetic/long.h +++ b/include/ruby/internal/arithmetic/long.h @@ -115,7 +115,7 @@ RB_INT2FIX(long i) /* :NOTE: VALUE can be wider than long. As j being unsigned, 2j+1 is fully * defined. Also it can be compiled into a single LEA instruction. */ const unsigned long j = i; - const unsigned long k = 2 * j + RUBY_FIXNUM_FLAG; + const unsigned long k = (j << 1) + RUBY_FIXNUM_FLAG; const long l = k; const SIGNED_VALUE m = l; /* Sign extend */ const VALUE n = m; |