[PATCH] D120260: [BOLT][NFC] Fix undefined behavior in encodeAnnotationImm

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 21 09:38:35 PST 2022


Amir created this revision.
Herald added subscribers: ayermolo, pengfei, kristof.beyls, mgorny.
Herald added a reviewer: rafauler.
Herald added a reviewer: maksfb.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

Fix UBSan-reported issue in MCPlusBuilder::encodeAnnotationImm (left shift of a
negative value).

Test Plan:

  ninja check-bolt
  ...
  PASS: BOLT-Unit :: Core/./CoreTests/AArch64/MCPlusBuilderTester.Annotation/0 (130 of 134)
  PASS: BOLT-Unit :: Core/./CoreTests/X86/MCPlusBuilderTester.Annotation/0 (131 of 134)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120260

Files:
  bolt/include/bolt/Core/MCPlusAnnotation.h
  bolt/include/bolt/Core/MCPlusBuilder.h
  bolt/unittests/Core/CMakeLists.txt
  bolt/unittests/Core/MCPlusBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120260.410328.patch
Type: text/x-patch
Size: 4669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220221/e427dea5/attachment.bin>


More information about the llvm-commits mailing list