I was running the FuchsiaHandleCheck over some code and tried to collect and distill some false positives due to symbol escaping not working properly for integers.
After writing down all those test cases I feel like it is not always trivial what to do, so I decided to upload and annotate them so we can discuss here in depth what is the right way to deal with them.
This has nothing to do with symbolic regions. We can run into this problem even if it's a local variable in the current stack frame:
The solution that'll obviously work would be to keep track of all regions that escaped at least once, and then not even start tracking the handle if it's getting placed into a region that causes an escape when written into or has itself escaped before, but that sounds like a huge overkill.
Lemme think. This sounds vaguely familiar but i can't immediately recall what my thoughts were last time i thought about it.