Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 4486
   1: WRITELN >
   2: WRITELN 1.txt echo 123
   3: WRITELN cat 1.txt
   4: WRITELN ls
   5: 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 $ /in/Calls.c:155:22: runtime error: null pointer passed as argument 1, which is declared to never be null
/usr/include/unistd.h:582:14: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/Calls.c:155:22 in 
AddressSanitizer:DEADLYSIGNAL
=================================================================
==4488==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f1055b434b0 bp 0x7ffe3a2aa010 sp 0x7ffe3a2a9f80 T0)
==4488==The signal is caused by a READ memory access.
==4488==Hint: address points to the zero page.
    #0 0x7f1055b434af  (/lib/x86_64-linux-gnu/libc.so.6+0xe54af)
    #1 0x5198b5  (/out/package/mumsh_memory_check+0x5198b5)
    #2 0x519ec8  (/out/package/mumsh_memory_check+0x519ec8)
    #3 0x51635e  (/out/package/mumsh_memory_check+0x51635e)
    #4 0x7f1055a7fb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #5 0x41d499  (/out/package/mumsh_memory_check+0x41d499)

AddressSanitizer can not provide additional info.
SUMMARY: Addre

JOJ Answer

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