Record Case Detail

Notes

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

Stderr

$ ./ex3_memory_check rand_char*.txt dec

=================================================================
==2486==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2560000 byte(s) in 10000 object(s) allocated from:
    #0 0x55f3cf8bc37e in malloc (/out/package/ex3_memory_check+0xc837e) (BuildId: 477ac3f2a7645562e27941636e3ef94c2de82c1a)
    #1 0x55f3cf8f9391 in main (/out/package/ex3_memory_check+0x105391) (BuildId: 477ac3f2a7645562e27941636e3ef94c2de82c1a)
    #2 0x7fe19e4b9c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) (BuildId: f7307432a8b162377e77a182b6cc2e53d771ec4b)

Direct leak of 49909 byte(s) in 10000 object(s) allocated from:
    #0 0x55f3cf8bc37e in malloc (/out/package/ex3_memory_check+0xc837e) (BuildId: 477ac3f2a7645562e27941636e3ef94c2de82c1a)
    #1 0x55f3cf8f936d in main (/out/package/ex3_memory_check+0x10536d) (BuildId: 477ac3f2a7645562e27941636e3ef94c2de82c1a)
    #2 0x7fe19e4b9c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) (BuildId: f730743

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!