[PATCH] D131914: [ubsan-minimal] Report the address of an error

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 3 10:05:49 PDT 2022


MaskRay added inline comments.


================
Comment at: compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp:56
+                                                   uintptr_t caller) {
+  unsigned int shift = sizeof(uintptr_t) * 8 - 4;
+  // print the address by nibbles
----------------
`s/unsigned int/unsigned/` everywhere


================
Comment at: compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp:56
+                                                   uintptr_t caller) {
+  unsigned int shift = sizeof(uintptr_t) * 8 - 4;
+  // print the address by nibbles
----------------
MaskRay wrote:
> `s/unsigned int/unsigned/` everywhere
You may change the loop to do `shift -= 4` first, then the declaration can omit `- 4`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131914/new/

https://reviews.llvm.org/D131914



More information about the llvm-commits mailing list