Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 2725
   1: WRITELN echo 123
   2: WRITELN 
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 $ 123
mumsh $ mumsh.c:670:26: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mumsh.c:670:26 in 
mumsh.c:670:8: runtime error: addition of unsigned offset to 0x7ffcb4ee0e70 overflowed to 0x7ffcb4ee0e6f
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior mumsh.c:670:8 in 
=================================================================
==2726==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffcb4ee0e6f at pc 0x00000051e4e5 bp 0x7ffcb4ee0910 sp 0x7ffcb4ee0908
READ of size 1 at 0x7ffcb4ee0e6f thread T0
    #0 0x51e4e4  (/out/package/mumsh_memory_check+0x51e4e4)
    #1 0x51eb2f  (/out/package/mumsh_memory_check+0x51eb2f)
    #2 0x7fd7ba24eb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x41cc59  (/out/package/mumsh_memory_check+0x41cc59)

Address 0x7ffcb4ee0e6f is located in stack of thread T0 at offset 47 in frame
    #0 0x51e82f  (/out/package/mumsh_memory_check+0x51e82f)

  This f

JOJ Answer

mumsh $ 123
mumsh $ mumsh $ exit