Record Case Detail

Notes

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

Stderr

$ ./l5_memory_check rand_int.txt inc
=================================================================
==128555==ERROR: AddressSanitizer: heap-use-after-free on address 0x60300004af30 at pc 0x0000005175ca bp 0x7ffce44944a0 sp 0x7ffce4494498
READ of size 8 at 0x60300004af30 thread T0
    #0 0x5175c9  (/out/package/l5_memory_check+0x5175c9)
    #1 0x5175fd  (/out/package/l5_memory_check+0x5175fd)
    #2 0x517a66  (/out/package/l5_memory_check+0x517a66)
    #3 0x517bc9  (/out/package/l5_memory_check+0x517bc9)
    #4 0x7f10dea50b96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #5 0x41cac9  (/out/package/l5_memory_check+0x41cac9)

0x60300004af30 is located 16 bytes inside of 24-byte region [0x60300004af20,0x60300004af38)
freed by thread T0 here:
    #0 0x4dc7b0  (/out/package/l5_memory_check+0x4dc7b0)
    #1 0x5174c3  (/out/package/l5_memory_check+0x5174c3)
    #2 0x5175fd  (/out/package/l5_memory_check+0x5175fd)
    #3 0x517a66  (/out/package/l5_memory_check+0x517a66)
    #4 0x517bc9  (/out/package/l5_memory_che

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

Program exit with non zero value 1!

JOJ Answer

Correct!