liballocs
liballocs copied to clipboard
Detect boundary-affecting argv-clobbering by setproctitle() or similar
Linux explicitly sanctions a method of 'setting the process name' which not only clobbers argument and environment strings, but also shifts the effective boundary between the two, such that the command name argv[0]
may spill over into an area previously used for environment strings. Ideally we'd catch this and be able to expose it in the auxv
allocator's interfaces. See my blog post. This is a low-priority issue.
Some more useful stuff for when it matters to get this right: https://stackoverflow.com/questions/273691/using-progname-instead-of-argv0