When `jspawnhelper` is run without args it outputs:
"This command is not for general use and should only be run as the result of a call to ProcessBuilder.start() or Runtime.exec() in a java application"
JDK-8310265 broke this. Now `jspawnhelper` fails with sigfault because of the change:
- /* argv[0] contains the fd number to read all the child info */
+ /* argv[1] contains the fd number to read all the child info */
int r, fdin, fdout;
- r = sscanf (argv[argc-1], "%d:%d", &fdin, &fdout);
+ r = sscanf (argv[1], "%d:%d", &fdin, &fdout);
Without args, argc is 1, so argv[1] is an out of bound access.