Notes
This function is in beta test. Please help improve it in the issues
here.
pwd: /out/package ppid: 107245 1: CTRL+C Scan child pids of ppid: 107245 SIGINT Send signal 2 to pid: 107245 Scan child pids of ppid: 107246 Send signal 2 to pid: 107246 Scan child pids of ppid: 107247 Send signal 2 to pid: 107247 2: CTRL+C Scan child pids of ppid: 107245 SIGINT Send signal 2 to pid: 107245 Scan child pids of ppid: 107246 Send signal 2 to pid: 107246 Scan child pids of ppid: 107250 Send signal 2 to pid: 107250 exit: 1
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
mumsh $ mumsh.c:65:13: runtime error: index 128 out of bounds for type 'int [128]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mumsh.c:65:13 in ================================================================= ==107246==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000000480 at pc 0x000000517199 bp 0x7fff1507e5f0 sp 0x7fff1507e5e8 READ of size 8 at 0x619000000480 thread T0 #0 0x517198 (/out/package/mumsh_memory_check+0x517198) #1 0x7f1df5f0cb96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #2 0x41ccb9 (/out/package/mumsh_memory_check+0x41ccb9) 0x619000000480 is located 0 bytes to the right of 1024-byte region [0x619000000080,0x619000000480) allocated by thread T0 here: #0 0x4dcb70 (/out/package/mumsh_memory_check+0x4dcb70) #1 0x5151d2 (/out/package/mumsh_memory_check+0x5151d2) #2 0x7f1df5f0cb96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) SUMMARY: AddressSanitizer: heap-buffer-overflow (/out/package/mumsh_memory_check+0x517198) Shadow bytes around the bug
JOJ Answer
mumsh $ mumsh $ mumsh $ exit