Record Case Detail

Notes

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

Stderr

 pwd: /out/package
ppid: 4264
   1: WRITELN sleep 10
   2: CTRL+C
Scan child pids of ppid: 4264
SIGINT
Send signal 2 to pid: 4264
Scan child pids of ppid: 4265
Send signal 2 to pid: 4265
Scan child pids of ppid: 4266
Send signal 2 to pid: 4266
   3: WRITELN echo success
   4: CTRL+C
Scan child pids of ppid: 4264
SIGINT
Send signal 2 to pid: 4264
Scan child pids of ppid: 4265
Send signal 2 to pid: 4265
Scan child pids of ppid: 4269
Send signal 2 to pid: 4269
   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 $ =================================================================
==4265==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000000480 at pc 0x0000005189e9 bp 0x7fffff8b3a90 sp 0x7fffff8b3a88
READ of size 1 at 0x619000000480 thread T0
    #0 0x5189e8  (/out/package/mumsh_memory_check+0x5189e8)
    #1 0x7f6927056b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #2 0x41d1a9  (/out/package/mumsh_memory_check+0x41d1a9)

0x619000000480 is located 0 bytes to the right of 1024-byte region [0x619000000080,0x619000000480)
allocated by thread T0 here:
    #0 0x4dd288  (/out/package/mumsh_memory_check+0x4dd288)
    #1 0x517ad0  (/out/package/mumsh_memory_check+0x517ad0)
    #2 0x7f6927056b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/out/package/mumsh_memory_check+0x5189e8) 
Shadow bytes around the buggy address:
  0x0c327fff8040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c327fff8050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3

JOJ Answer

mumsh $ 
mumsh $ success
mumsh $ 
mumsh $ exit