Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 610
   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 $ /in/main.c:105:21: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/main.c:105:21 in 
/in/main.c:105:6: runtime error: addition of unsigned offset to 0x61900001f980 overflowed to 0x61900001f97f
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/main.c:105:6 in 
=================================================================
==611==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61900001f97f at pc 0x0000005170df bp 0x7ffc244833f0 sp 0x7ffc244833e8
WRITE of size 1 at 0x61900001f97f thread T0
    #0 0x5170de  (/out/package/mumsh_memory_check+0x5170de)
    #1 0x54e008  (/out/package/mumsh_memory_check+0x54e008)
    #2 0x7f31a6e88b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x41d3b9  (/out/package/mumsh_memory_check+0x41d3b9)

0x61900001f97f is located 1 bytes to the left of 985-byte region [0x61900001f980,0x61900001fd59)
allocated by thread T0 here:
  

JOJ Answer

mumsh $ 123
mumsh $ mumsh $ exit