Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

mm_set is being used. As I recall that pattern was inspired by looking at a libc implementation for memset. The combination of using volatile and the asm("") statements keep the compiler from optimizing away what it thinks are unnecessary memset (like a wipe operation). It's possible that solution doesn't work on every system though. So, how would you improve it?


http://www.5starstandard.ca/projects/myosin/myosin/string/me...

Basically just the right inline asm. But the project as a whole is a bit of a mess, multiple 'memssets' will not do anything to make things more secure than just one.




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

Search: