Thanks to Address Space Layout Randomization you can use the address of a stack variable as a zero-cost random number.