stable addresses for local variables, etc #15
Labels
A-stable-address
Topic: Related to stable addresses
S-pending-design
Status: Resolving this issue requires addressing some open design questions
When do we guarantee "stable" addresses? (Meaning that the integral value of a pointer remains the same). Note that addresses are visible to safe code via
as
conversions.Some examples:
Local variables
Are the integral values of
y
andz
guaranteed to be equal? It might be useful if they were not, since a compiler could keepx
in a register and spill it to memory in different spots on the stack.Assuming the answer to this question is "yes", are locals still guaranteed to have a stable address when they are reallocated using
StorageDead
/StorageLive
? For example:Or:
Edit by @digama0: moved question about const address stability to #406 , clarified question on killed locals
The text was updated successfully, but these errors were encountered: