Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 13084
   1: WRITELN echo 123 > 1.txt
   2: WRITELN cat < 1.txt >> 2.txt
   3: WRITELN cat 1.txt
   4: WRITELN cat 2.txt
   5: WRITELN ls
   6: WRITELN exit

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.

Please double check your code to solve this problem and try again.

Your Answer

mumsh $ =================================================================
==13085==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000000980 at pc 0x00000049a00c bp 0x7fff011cdac0 sp 0x7fff011cd270
READ of size 1025 at 0x619000000980 thread T0
    #0 0x49a00b  (/out/package/mumsh_memory_check+0x49a00b)
    #1 0x51a218  (/out/package/mumsh_memory_check+0x51a218)
    #2 0x51e842  (/out/package/mumsh_memory_check+0x51e842)
    #3 0x52d215  (/out/package/mumsh_memory_check+0x52d215)
    #4 0x7f5a75ca8b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #5 0x41d569  (/out/package/mumsh_memory_check+0x41d569)

0x619000000980 is located 0 bytes to the right of 1024-byte region [0x619000000580,0x619000000980)
allocated by thread T0 here:
    #0 0x4dd420  (/out/package/mumsh_memory_check+0x4dd420)
    #1 0x519a6d  (/out/package/mumsh_memory_check+0x519a6d)
    #2 0x51e842  (/out/package/mumsh_memory_check+0x51e842)
    #3 0x52d215  (/out/package/mumsh_memory_check+0x52d215)
    #4 0x7f5a75ca8b96  (/lib/x86

JOJ Answer

mumsh $ mumsh $ mumsh $ 123
mumsh $ 123
mumsh $ 1.txt
2.txt
driver
mumsh
mumsh_memory_check
mumsh $ exit