Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 47639
   1: WRITELN echo 123 > 1.txt
   2: WRITELN echo 321 > 2.txt
   3: WRITELN cat < 1.txt | cat | cat | cat | cat | cat | cat | cat | cat | cat | cat | cat | cat | cat | cat >> 2.txt
   4: WRITELN cat 1.txt
   5: WRITELN cat 2.txt
   6: WRITELN ls
   7: 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 $ mumsh $ mumsh $ /in/mumsh.c:78:27: runtime error: index 1024 out of bounds for type 'char [1000]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/mumsh.c:78:27 in 
/in/mumsh.c:391:25: runtime error: load of value 99, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/mumsh.c:391:25 in 
/in/mumsh.c:346:16: runtime error: member access within null pointer of type 'command' (aka 'struct command')
/in/mumsh.c:338:8: runtime error: member access within null pointer of type 'command' (aka 'struct command')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/mumsh.c:346:16 in 
AddressSanitizer:DEADLYSIGNAL
=================================================================
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/mumsh.c:338:8 in 
==47640==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000038 (pc 0x00000051d6c4 bp 0x7fff821f62f0 sp 0x7fff821f61a0 T0)
AddressSanitizer:DEADLYSIGNAL
===============================

JOJ Answer

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