One scenario is that argc is 0 and argv[0] is NULL.
The other scenario is that argc is 0, argv is NULL, and argv[0] does not exist.
The C standard makes the second scenario invalid, but Linux was allowing it.
This is all directly relevant to the first two posts in the comment thread, talking about "relying on magic values (NULL termination)" and "Obviously, if argc == 0, you should not dereference anything in argv. [...] shows why C is such a hard programming language". Even though they were talking about C by itself, that's actually incorrect, C guarantees the null termination and this rule was being broken by the OS.
One scenario is that argc is 0 and argv[0] is NULL.
The other scenario is that argc is 0, argv is NULL, and argv[0] does not exist.
The C standard makes the second scenario invalid, but Linux was allowing it.
This is all directly relevant to the first two posts in the comment thread, talking about "relying on magic values (NULL termination)" and "Obviously, if argc == 0, you should not dereference anything in argv. [...] shows why C is such a hard programming language". Even though they were talking about C by itself, that's actually incorrect, C guarantees the null termination and this rule was being broken by the OS.