]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Modify none/tests/execve.c so to avoid infinite loop with --trace-children=yes
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 11 Mar 2012 20:47:41 +0000 (20:47 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 11 Mar 2012 20:47:41 +0000 (20:47 +0000)
With --trace-children=yes, none/test/execve exec ve forever.

This avoids an infinite loop when running outer on inner regression
tests (for which --trace-children=yes is mandatory for the outer).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12440

none/tests/execve.c

index 842df78b52b267ad4506d9210a8de356f2824e10..aba252967d4eac46ec9ac289f2c62fa0e00a1be6 100644 (file)
@@ -8,7 +8,7 @@ int main(int argc, char **argv)
    {
       // This tests the case where argv and envp are NULL, which is easy to
       // get wrong because it's an unusual case.
-      if (execve(argv[0], NULL, NULL) < 0)
+      if (execve("/bin/true", NULL, NULL) < 0)
       {
          perror("execve");
          exit(1);