Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 107237
   1: WRITELN sleep 10 | echo 123
   2: CTRL+C
Scan child pids of ppid: 107237
SIGINT
Send signal 2 to pid: 107237
Scan child pids of ppid: 107238
Send signal 2 to pid: 107238
Scan child pids of ppid: 107239
Send signal 2 to pid: 107239
Scan child pids of ppid: 107241
Send signal 2 to pid: 107241
   3: WRITELN echo success
   4: WRITELN exit
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 $ 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 
=================================================================
==107238==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000000480 at pc 0x000000517199 bp 0x7fff983b3bf0 sp 0x7fff983b3be8
READ of size 8 at 0x619000000480 thread T0
    #0 0x517198  (/out/package/mumsh_memory_check+0x517198)
    #1 0x7f3155168b96  (/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 0x7f3155168b96  (/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 $ success
mumsh $ exit