Record Case Detail

Notes

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

Stderr

$ ./ex3_memory_check rand_double.txt dec
=================================================================
==124112==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000c41c7f at pc 0x0000004adb8c bp 0x7ffc3e6cc050 sp 0x7ffc3e6cb800
WRITE of size 1024 at 0x619000c41c7f thread T0
    #0 0x4adb8b  (/out/package/ex3_memory_check+0x4adb8b)
    #1 0x515c79  (/out/package/ex3_memory_check+0x515c79)
    #2 0x515212  (/out/package/ex3_memory_check+0x515212)
    #3 0x7fae79b2bb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #4 0x41cb59  (/out/package/ex3_memory_check+0x41cb59)

0x619000c41c7f is located 0 bytes to the right of 1023-byte region [0x619000c41880,0x619000c41c7f)
allocated by thread T0 here:
    #0 0x4dcc38  (/out/package/ex3_memory_check+0x4dcc38)
    #1 0x515b7e  (/out/package/ex3_memory_check+0x515b7e)
    #2 0x515212  (/out/package/ex3_memory_check+0x515212)
    #3 0x7fae79b2bb96  (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/out/package/ex3

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!