[compiler-rt] [sanitizer] Fix type in some Min() calls (PR #119248)

Stefan Schulze Frielinghaus via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 03:04:03 PST 2024


================
@@ -532,8 +532,8 @@ INTERCEPTOR(int, strncmp, const char *s1, const char *s2, usize size) {
     for (; i1 < size && s1[i1]; i1++) {}
     for (; i2 < size && s2[i2]; i2++) {}
   }
-  COMMON_INTERCEPTOR_READ_RANGE((ctx), (s1), Min(i1 + 1, size));
-  COMMON_INTERCEPTOR_READ_RANGE((ctx), (s2), Min(i2 + 1, size));
+  COMMON_INTERCEPTOR_READ_RANGE((ctx), (s1), Min<uptr>(i1 + 1, size));
+  COMMON_INTERCEPTOR_READ_RANGE((ctx), (s2), Min<uptr>(i2 + 1, size));
----------------
stefan-sf-ibm wrote:

I agree. In the first PR #116957 I did that which got partially merged and then followed the style in PR #119114. I came up with an updated version which works fine for me.

https://github.com/llvm/llvm-project/pull/119248


More information about the llvm-commits mailing list