/ Test /

Record Case Detail

Notes

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

Stderr

=================================================================
==83629==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x606000000058 at pc 0x00000051bee6 bp 0x7fffe9d765d0 sp 0x7fffe9d765c8
READ of size 4 at 0x606000000058 thread T0
    #0 0x51bee5  (/out/package/call_mem+0x51bee5)
    #1 0x7f142e3d4b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #2 0x41d719  (/out/package/call_mem+0x41d719)

0x606000000058 is located 0 bytes to the right of 56-byte region [0x606000000020,0x606000000058)
allocated by thread T0 here:
    #0 0x515d40  (/out/package/call_mem+0x515d40)
    #1 0x51a737  (/out/package/call_mem+0x51a737)
    #2 0x7f142e3d4b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/out/package/call_mem+0x51bee5) 
Shadow bytes around the buggy address:
  0x0c0c7fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c0c7fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c0c7fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

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

Starting tick #0
Starting tick #1
Call from Jeff a gold member

JOJ Answer

Starting tick #0
Starting tick #1
Call from Jeff a gold member
Answering call from Jeff
Starting tick #2