Long story short, I would like to read all data on the stack, or at least the parts from
main until wherever.
valgrind has not been very happy about this, but I’ve figured that I have just been a little bit off. Now, I’m not so sure, as I suppose there might be a lot of stuff on the stack that we’re not supposed to read. This leads me to my topic: is this simply a lost cause and will forever and ever be UB and my program will end up ordering 1000 kg of bananas from Amazon, or do I just risk reading some strange values, and that’s that?
Similarly, is it alright to cast a
usize to some
ptr type, if it just happens to actually be valid? Or are there some UB traps here as well?