[Lldb-commits] [PATCH] D131312: [LLDB][NFC] Fix suspicious bitwise expression in PrintBTEntry()

Slava Gurevich via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 5 22:20:22 PDT 2022


fixathon created this revision.
fixathon added reviewers: clayborg, JDevlieghere, DavidSpickett, jasonmolenda.
Herald added a project: All.
fixathon requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Current application of bitwise-OR to a binary mask always results in True, which seems
inconsistent with the intent of the statement, a likely typo.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131312

Files:
  lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp


Index: lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
===================================================================
--- lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
+++ lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
@@ -63,7 +63,7 @@
   const lldb::addr_t one_cmpl64 = ~((lldb::addr_t)0);
   const lldb::addr_t one_cmpl32 = ~((uint32_t)0);
 
-  if ((lbound == one_cmpl64 || one_cmpl32) && ubound == 0) {
+  if ((lbound == one_cmpl64 || lbound == one_cmpl32) && ubound == 0) {
     result.Printf("Null bounds on map: pointer value = 0x%" PRIu64 "\n", value);
   } else {
     result.Printf("    lbound = 0x%" PRIu64 ",", lbound);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131312.450473.patch
Type: text/x-patch
Size: 679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220806/d0af4016/attachment.bin>


More information about the lldb-commits mailing list