[clang] [clang] fix wrong result of pointers comparison between unknown and stack (PR #122404)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 11 02:56:52 PST 2025


steakhal wrote:

My current stance is that we should have the memoryspace trait only for memregions that have an UnknownSpace memspace, becuase that would be the least amount of work. So it would be a hybrid solution.
We have the memspaces as we have today, but for UnknownSpace you would need to query the trait if we have more accurate memspace that we somehow inferred.

Basically the contract would be:
Two memregions have the same memspace, if they compare equal, or if any was UnknownSpace, then do a lookup in the helper trait to see if we have anything for the region. If we do, just use that associated memspace instead of the UnknowSpace. Do the same for the other memregion before comparing them.

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


More information about the cfe-commits mailing list