Comment 6 for bug 1850184

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

so calling an ioctl seems to clear the global argc in klibc built with gcc-9

163 if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0)
(gdb) bt
#0 find_unused_loop_device () at usr/utils/losetup.c:163
#1 0x0000000000401135 in main (argc=2, argv=0x7fffffffe618) at usr/utils/losetup.c:454
(gdb) n
164 someloop++; /* in use */
(gdb) bt
#0 find_unused_loop_device () at usr/utils/losetup.c:164
#1 0x0000000000401135 in main (argc=0, argv=0x7fffffffe618) at usr/utils/losetup.c:454