4 ms·
Unlike other bugs, this change shouldn't break any application that is being called. argc >= 1 is the normal use case. So this would break anything that calls
by takeda 5y ago
Unlike other bugs, this change shouldn't break any application that is being called. argc >= 1 is the normal use case.
So this would break anything that calls execve() with argc==0. Is such call providing any functionality?
In addition to returning EINVAL being produced by not well written callers, another option would be to force argc==0 and fill up argv[0] with process name. That fix would make everything continue to work.
- yuubi 5y agoThe ldd program that lists the shared libraries used by an executable at least used to exec with an empty argv, which the dynamic linker detected and listed libraries instead of linking and running. I learned that when I screwed up an inetd configuration and saw a list of libraries instead of the desired results. Edit: just tried on windows 10 WSL, and it had a sad (blue screen).
- mst 5y agoWSL2 has made my life so much better that now I want to give it a hug. (also, TIL, thank you)