Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 18367
   1: WRITELN echo 321 > 1.txt
   2: WRITELN cat <
   3: WRITELN 1.txt
   4: WRITELN ls
   5: 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 $ mumsh $ mumsh $ /in/main.c:339:31: runtime error: index -1 out of bounds for type 'char *[100]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/main.c:339:31 in 
=================================================================
==18368==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000013c98f8 at pc 0x000000521de2 bp 0x7ffdbf8be090 sp 0x7ffdbf8be088
READ of size 8 at 0x0000013c98f8 thread T0
    #0 0x521de1  (/out/package/mumsh_memory_check+0x521de1)
    #1 0x529143  (/out/package/mumsh_memory_check+0x529143)
    #2 0x7fd766b08b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x41d0e9  (/out/package/mumsh_memory_check+0x41d0e9)

0x0000013c98f8 is located 8 bytes to the left of global variable 'args' defined in '/in/main.c:16:7' (0x13c9900) of size 800
0x0000013c98f8 is located 52 bytes to the right of global variable 'pidCount' defined in '/in/main.c:15:5' (0x13c98c0) of size 4
SUMMARY: AddressSanitizer: global-buffer-overflow (/out/package/mumsh_memory_check+0x521de1) 

JOJ Answer

mumsh $ mumsh $ > 321
mumsh $ 1.txt
driver
mumsh
mumsh_memory_check
mumsh $ exit