[PATCH] D64597: CodeGet: Init 32bit pointers with 0xFFFFFFFF

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 19:14:42 PDT 2019


vitalybuka added a comment.

In D64597#1581654 <https://reviews.llvm.org/D64597#1581654>, @jfb wrote:

> In D64597#1581605 <https://reviews.llvm.org/D64597#1581605>, @pcc wrote:
>
> > The problem with `0xaaaaaaaa` on 32-bit is that it is likely to be a valid address.
> >
> > When I discussed this with JF I proposed a pointer initialization of `0xffffffff` which he agreed to. This value is very likely to trap when accessed (due to accesses likely wrapping to zero) and also has the benefit of being the same pattern as for floats.
>
>
> Indeed.


Done. This is even more effective.
Maybe we should consider 0xAA for floats on 64bit?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64597





More information about the cfe-commits mailing list