==454548== Memcheck, a memory error detector
==454548== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==454548== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==454548== Command: ./a.out
==454548== 
==454548== Invalid write of size 4
==454548==    at 0x400820: main (a.cc:10)
==454548==  Address 0x5b4dca8 is 0 bytes after a block of size 40 alloc'd
==454548==    at 0x4C39B6F: operator new[](unsigned long) (vg_replace_malloc.c:640)
==454548==    by 0x400813: main (a.cc:9)
==454548== 
==454548== Conditional jump or move depends on uninitialised value(s)
==454548==    at 0x400833: main (a.cc:14)
==454548== 
==454548== Mismatched free() / delete / delete []
==454548==    at 0x4C3AA93: free (vg_replace_malloc.c:872)
==454548==    by 0x400854: main (a.cc:17)
==454548==  Address 0x5b4dc80 is 0 bytes inside a block of size 40 alloc'd
==454548==    at 0x4C39B6F: operator new[](unsigned long) (vg_replace_malloc.c:640)
==454548==    by 0x400813: main (a.cc:9)
==454548== 
Hi==454548== 
==454548== HEAP SUMMARY:
==454548==     in use at exit: 17 bytes in 1 blocks
==454548==   total heap usage: 4 allocs, 3 frees, 76,857 bytes allocated
==454548== 
==454548== 17 bytes in 1 blocks are definitely lost in loss record 1 of 1
==454548==    at 0x4C39B6F: operator new[](unsigned long) (vg_replace_malloc.c:640)
==454548==    by 0x4007F7: f() (a.cc:3)
==454548==    by 0x400848: main (a.cc:16)
==454548== 
==454548== LEAK SUMMARY:
==454548==    definitely lost: 17 bytes in 1 blocks
==454548==    indirectly lost: 0 bytes in 0 blocks
==454548==      possibly lost: 0 bytes in 0 blocks
==454548==    still reachable: 0 bytes in 0 blocks
==454548==         suppressed: 0 bytes in 0 blocks
==454548== 
==454548== Use --track-origins=yes to see where uninitialised values come from
==454548== For lists of detected and suppressed errors, rerun with: -s
==454548== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
