Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

 pwd: /out/package
ppid: 107253
   1: WRITELN sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | sleep 10 | echo 123
   2: CTRL+C
Scan child pids of ppid: 107253
SIGINT
Send signal 2 to pid: 107253
Scan child pids of ppid: 107254
Send signal 2 to pid: 107254
Scan child pids of ppid: 107255
Send signal 2 to pid: 107255
Scan child pids of ppid: 107256
Send signal 2 to pid: 107256
Scan child pids of ppid: 107257
Send signal 2 to pid: 107257
Scan child pids of ppid: 107258
Send signal 2 to pid: 107258
Scan child pids of ppid: 107259
Send signal 2 to pid: 107259
Scan child pids of ppid: 107260
Send signal 2 to pid: 107260
Scan child pids of ppid: 107261
Send signal 2 to pid: 107261
Scan child pids of ppid: 107262
Send signal 2 to pid: 107262
Scan child pids of ppid: 107263
Send signal 2 to pid: 107263
Scan child pids of ppid: 107265
Send signal 2 to pid: 107265
   3: CTRL+C
Scan child pids of ppid: 107253
SIGINT
Send signal 2 to pid: 107253
Scan child pids of ppid: 107254
Send 

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 $ 123
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 
=================================================================
==107254==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000000480 at pc 0x000000517199 bp 0x7ffd7d8f1850 sp 0x7ffd7d8f1848
READ of size 8 at 0x619000000480 thread T0
    #0 0x517198  (/out/package/mumsh_memory_check+0x517198)
    #1 0x7f817048fb96  (/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 0x7f817048fb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/out/package/mumsh_memory_check+0x517198) 
Shadow bytes ar

JOJ Answer

mumsh $ 123

mumsh $ 
mumsh $ success
mumsh $ 
mumsh $ exit