Record Case Detail

Notes

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

Stderr

=================================================================
==59503==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7ffff427f2a8 at pc 0x0000005216e0 bp 0x7ffff427f140 sp 0x7ffff427f138
WRITE of size 8 at 0x7ffff427f2a8 thread T0
    #0 0x5216df  (/out/package/dlist_mem+0x5216df)
    #1 0x51ee9f  (/out/package/dlist_mem+0x51ee9f)
    #2 0x5203ef  (/out/package/dlist_mem+0x5203ef)
    #3 0x7f10d5ec0c86  (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #4 0x41da19  (/out/package/dlist_mem+0x41da19)

Address 0x7ffff427f2a8 is located in stack of thread T0 at offset 8 in frame
    #0 0x5201af  (/out/package/dlist_mem+0x5201af)

  This frame has 4 object(s):
    [32, 40) 'ref.tmp8.i'
    [64, 65) 'ref.tmp10.i'
    [80, 84) 'testnum' (line 32)
    [96, 100) 'ref.tmp' (line 34)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-underflow (/out/package/dlis

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


        

JOJ Answer

Test success.