1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-23 03:53:43 +01:00

tests: Walk default test arguments to ensure child process has visibility

This commit is contained in:
Dave Watson 2017-01-07 09:13:33 -08:00
parent 5dcb7cd3cb
commit 32e3e93b01

View file

@ -182,6 +182,11 @@ main (int argc, char **argv)
/* automated test case */ /* automated test case */
argv = args; argv = args;
/* Unless the args array is 'walked' the child
process is unable to access it and dies with a segfault */
fprintf(stderr, "Automated test (%s,%s,%s,%s)\n",
args[0],args[1],args[2],args[3]);
} }
else if (argc > 1) else if (argc > 1)
while (argv[optind][0] == '-') while (argv[optind][0] == '-')