pcc added inline comments.

================
Comment at: compiler-rt/trunk/lib/hwasan/hwasan_checks.h:76
+#endif
+  return *(u8 *)(ptr | (kShadowAlignment - 1)) == ptr_tag;
+}
----------------
xiangzhangllvm wrote:
> Hello @pcc I think here seems some problem, the ptr is user passing point,
> *(ptr + n) should have the user's real data. it shouldn't  "== ptr_tag".
If this is a short granule then from the user's perspective the maximum size of 
the granule is (granule size - 1). This means that the last byte of the granule 
is free for us to use to store the granule's real tag.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63908

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D63908: hwasan... Xiang Zhang via Phabricator via cfe-commits
    • [PATCH] D63908: h... Peter Collingbourne via Phabricator via cfe-commits

Reply via email to