Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 2826
   1: WRITELN > abc | | grep 123
   2: 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.c:598:24: runtime error: null pointer passed as argument 1, which is declared to never be null
=================================================================
==2828==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffcee073aaf at pc 0x00000051bd13 bp 0x7ffcee06d570 sp 0x7ffcee06d568
WRITE of size 1 at 0x7ffcee073aaf thread T0
/usr/include/string.h:137:33: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mumsh.c:598:24 in 
AddressSanitizer:DEADLYSIGNAL
=================================================================
==2827==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000004b212b bp 0x7ffcee06d5f0 sp 0x7ffcee06cd60 T0)
==2827==The signal is caused by a READ memory access.
==2827==Hint: address points to the zero page.
    #0 0x51bd12  (/out/package/mumsh_memory_check+0x51bd12)
    #1 0x51d1dc  (/out/package/mumsh_memory_check+0x51d1dc)
    #2 0x51d998  (/out/package/mumsh_memory_check+0x51d998)
    #3 0x51ebab

JOJ Answer

mumsh $ error: missing program
mumsh $ exit