[all-commits] [llvm/llvm-project] 360b41: [libc] Fix undefined behavior in UInt<>::shift_right.

lntue via All-commits all-commits at lists.llvm.org
Wed Dec 7 15:38:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 360b41c7ba7f09e375e27b674ba44e96f3d1f055
      https://github.com/llvm/llvm-project/commit/360b41c7ba7f09e375e27b674ba44e96f3d1f055
  Author: Tue Ly <lntue at google.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M libc/src/__support/UInt.h
    M libc/test/src/__support/uint_test.cpp

  Log Message:
  -----------
  [libc] Fix undefined behavior in UInt<>::shift_right.

Fix undefined behavior of left-shifting uint64_t by 64 in
`UInt<>::shift_right` implementation.

Reviewed By: michaelrj, sivachandra

Differential Revision: https://reviews.llvm.org/D139566




More information about the All-commits mailing list