Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 4109
   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 $ =================================================================
==4110==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c0000000ff at pc 0x00000051efa3 bp 0x7ffd2ee60d90 sp 0x7ffd2ee60d88
READ of size 1 at 0x60c0000000ff thread T0
    #0 0x51efa2  (/out/package/mumsh_memory_check+0x51efa2)
    #1 0x51685c  (/out/package/mumsh_memory_check+0x51685c)
    #2 0x7f8d71f03b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x41d169  (/out/package/mumsh_memory_check+0x41d169)

0x60c0000000ff is located 1 bytes to the left of 120-byte region [0x60c000000100,0x60c000000178)
allocated by thread T0 here:
    #0 0x4dd020  (/out/package/mumsh_memory_check+0x4dd020)
    #1 0x7f8d71f61b8b  (/lib/x86_64-linux-gnu/libc.so.6+0x7fb8b)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/out/package/mumsh_memory_check+0x51efa2) 
Shadow bytes around the buggy address:
  0x0c187fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c187fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

JOJ Answer

mumsh $ 123
mumsh $ mumsh $ exit