Record Case Detail

Notes

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

Stderr

$ ./l5_memory_check rand_double.txt dec
=================================================================
==614==ERROR: AddressSanitizer: heap-use-after-free on address 0x603000000018 at pc 0x0000005162e7 bp 0x7fff7f449610 sp 0x7fff7f449608
WRITE of size 4 at 0x603000000018 thread T0
    #0 0x5162e6  (/out/package/l5_memory_check+0x5162e6)
    #1 0x5170f0  (/out/package/l5_memory_check+0x5170f0)
    #2 0x517279  (/out/package/l5_memory_check+0x517279)
    #3 0x7f606335cc86  (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #4 0x41c999  (/out/package/l5_memory_check+0x41c999)

0x603000000018 is located 8 bytes inside of 24-byte region [0x603000000010,0x603000000028)
freed by thread T0 here:
    #0 0x4dc680  (/out/package/l5_memory_check+0x4dc680)
    #1 0x515417  (/out/package/l5_memory_check+0x515417)
    #2 0x5170f0  (/out/package/l5_memory_check+0x5170f0)
    #3 0x517279  (/out/package/l5_memory_check+0x517279)
    #4 0x7f606335cc86  (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

previously allocated by thread T0 h

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!