Hacker News new | past | comments | ask | show | jobs | submit login

Only if it's accessed at least once in each page (4K), AIUI.



Right. If I simply zero the memory with `memset` then I guess it should be ok.


Unless the compiler decides that zeroing the memory doesn't do anything useful and optimizes it out.


Initializing your stack buffer probably does count as something useful, but in case it doesn't, try memset_s(3).


No: See http://en.cppreference.com/w/c/string/byte/memset#Notes -- if you don't read from it, the call may be optimized away.


Like my brethren say it's probably a good idea to use a "secure" memset that won't have an accident ^W ^W ^W be optimized out.


Or keep >4kB objects off stack.


I mean, that's probably a good practice. In my case I sort of had this idea that largish objects should be placed on the heap but I couldn't really figure out a good reason why, or what the limit should be, so I guess this vuln proposes both a reason and that the page limit is a good threshold.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: