Record Case Detail

Notes

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

Stderr

=================================================================
==59846==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7fff0e7bba48 at pc 0x0000005216e0 bp 0x7fff0e7bb8e0 sp 0x7fff0e7bb8d8
WRITE of size 8 at 0x7fff0e7bba48 thread T0
    #0 0x5216df  (/out/package/dlist_mem+0x5216df)
    #1 0x51b34e  (/out/package/dlist_mem+0x51b34e)
    #2 0x5203ef  (/out/package/dlist_mem+0x5203ef)
    #3 0x7f8413295c86  (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #4 0x41da19  (/out/package/dlist_mem+0x41da19)

Address 0x7fff0e7bba48 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.