nisse@lysator.liu.se (Niels Möller) writes:
I think the point multiplication functions were written under the
assumption that the scalar should be less than the group order.
Docs could perhaps be improved on that.
But I don't known now exactly how it fails. It's good you get the
valgrind failures, but line numbers don't quite match my version.
I was using the Nettle version installed on the system, sorry. I'm
attaching the complete log taken with the git master (d1e45e07f).
If ecc_mul_a can be made to support this, I take it the output will be a
point with z = 0 (mod p) in homogenenous coordinates.
And then the special case z = 0 has to be detected in some way in the
conversion to affine coordinates. That's done by ecc_j_to_a, but that
assumes a finite input point, since it inverts z without checking for
zero.
I think it would be nice if it hits an assertion failure.
As it works with the curve order minus 1, I added the following check
instead in my library, though I'm not sure if this satisfies the
original requirement:
P = (n - 1) * Q
Checking that (n-1) * Q = -Q should be mathematically equivalent.
There's a similar test in testsuite/ecc-mul-a-test.c and
testsuite/ecc-mul-g-test.c (but testing with the generator rather than
with an arbitrary public key).
Thanks for the pointer and the confirmation; I've tightened the check
based on testsuite/ecc-mul-a-test.c. For the record, the patch is:
https://gitlab.com/gnutls/gnutls/-/merge_requests/1299/diffs?commit_id=23756...
Regards,
--
Daiki Ueno
==42307== Memcheck, a memory error detector
==42307== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==42307== Using Valgrind-3.16.0 and LibVEX; rerun with -h for copyright info
==42307== Command: ./ecc-test
==42307== Parent PID: 3156
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x48670AA: _nettle_ecc_mul_a (ecc-mul-a.c:145)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485E278: _nettle_sec_tabselect (sec-tabselect.c:54)
==42307== by 0x486711A: _nettle_ecc_mul_a (ecc-mul-a.c:147)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F77F: _nettle_ecc_mod_add (ecc-mod-arith.c:53)
==42307== by 0x4862069: _nettle_ecc_dup_jj (ecc-dup-jj.c:81)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x4862117: _nettle_ecc_dup_jj (ecc-dup-jj.c:83)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x486216B: _nettle_ecc_dup_jj (ecc-dup-jj.c:84)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F77F: _nettle_ecc_mod_add (ecc-mod-arith.c:53)
==42307== by 0x486219F: _nettle_ecc_dup_jj (ecc-dup-jj.c:87)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x48621B7: _nettle_ecc_dup_jj (ecc-dup-jj.c:88)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F8F4: _nettle_ecc_mod_mul_1 (ecc-mod-arith.c:76)
==42307== by 0x486223F: _nettle_ecc_dup_jj (ecc-dup-jj.c:90)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F948: _nettle_ecc_mod_mul_1 (ecc-mod-arith.c:79)
==42307== by 0x486223F: _nettle_ecc_dup_jj (ecc-dup-jj.c:90)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F8F4: _nettle_ecc_mod_mul_1 (ecc-mod-arith.c:76)
==42307== by 0x4862323: _nettle_ecc_dup_jj (ecc-dup-jj.c:98)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F948: _nettle_ecc_mod_mul_1 (ecc-mod-arith.c:79)
==42307== by 0x4862323: _nettle_ecc_dup_jj (ecc-dup-jj.c:98)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485FB06: _nettle_ecc_mod_submul_1 (ecc-mod-arith.c:106)
==42307== by 0x486239C: _nettle_ecc_dup_jj (ecc-dup-jj.c:102)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485FB5A: _nettle_ecc_mod_submul_1 (ecc-mod-arith.c:109)
==42307== by 0x486239C: _nettle_ecc_dup_jj (ecc-dup-jj.c:102)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x4862426: _nettle_ecc_dup_jj (ecc-dup-jj.c:106)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485FB06: _nettle_ecc_mod_submul_1 (ecc-mod-arith.c:106)
==42307== by 0x48624C5: _nettle_ecc_dup_jj (ecc-dup-jj.c:108)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485FB5A: _nettle_ecc_mod_submul_1 (ecc-mod-arith.c:109)
==42307== by 0x48624C5: _nettle_ecc_dup_jj (ecc-dup-jj.c:108)
==42307== by 0x48671E6: _nettle_ecc_mul_a (ecc-mul-a.c:171)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485E278: _nettle_sec_tabselect (sec-tabselect.c:54)
==42307== by 0x4867245: _nettle_ecc_mul_a (ecc-mul-a.c:174)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x4862DFC: _nettle_ecc_add_jjj (ecc-add-jjj.c:81)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F77F: _nettle_ecc_mod_add (ecc-mod-arith.c:53)
==42307== by 0x4862E49: _nettle_ecc_add_jjj (ecc-add-jjj.c:84)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x4862E78: _nettle_ecc_add_jjj (ecc-add-jjj.c:86)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x4862E90: _nettle_ecc_add_jjj (ecc-add-jjj.c:87)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x4862F8A: _nettle_ecc_add_jjj (ecc-add-jjj.c:96)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F8F4: _nettle_ecc_mod_mul_1 (ecc-mod-arith.c:76)
==42307== by 0x4862FA3: _nettle_ecc_add_jjj (ecc-add-jjj.c:97)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F948: _nettle_ecc_mod_mul_1 (ecc-mod-arith.c:79)
==42307== by 0x4862FA3: _nettle_ecc_add_jjj (ecc-add-jjj.c:97)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F8F4: _nettle_ecc_mod_mul_1 (ecc-mod-arith.c:76)
==42307== by 0x486300B: _nettle_ecc_add_jjj (ecc-add-jjj.c:104)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F948: _nettle_ecc_mod_mul_1 (ecc-mod-arith.c:79)
==42307== by 0x486300B: _nettle_ecc_add_jjj (ecc-add-jjj.c:104)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x486306A: _nettle_ecc_add_jjj (ecc-add-jjj.c:111)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485FB06: _nettle_ecc_mod_submul_1 (ecc-mod-arith.c:106)
==42307== by 0x4863083: _nettle_ecc_add_jjj (ecc-add-jjj.c:112)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485FB5A: _nettle_ecc_mod_submul_1 (ecc-mod-arith.c:109)
==42307== by 0x4863083: _nettle_ecc_add_jjj (ecc-add-jjj.c:112)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F83F: _nettle_ecc_mod_sub (ecc-mod-arith.c:64)
==42307== by 0x48630B3: _nettle_ecc_add_jjj (ecc-add-jjj.c:116)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485FB06: _nettle_ecc_mod_submul_1 (ecc-mod-arith.c:106)
==42307== by 0x48630E4: _nettle_ecc_add_jjj (ecc-add-jjj.c:118)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485FB5A: _nettle_ecc_mod_submul_1 (ecc-mod-arith.c:109)
==42307== by 0x48630E4: _nettle_ecc_add_jjj (ecc-add-jjj.c:118)
==42307== by 0x486728A: _nettle_ecc_mul_a (ecc-mul-a.c:176)
==42307== by 0x4867D0F: nettle_ecc_point_mul (ecc-point-mul.c:56)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F577: _nettle_ecc_mod_inv (ecc-mod-inv.c:148)
==42307== by 0x48619DB: _nettle_ecc_j_to_a (ecc-j-to-a.c:70)
==42307== by 0x4867D54: nettle_ecc_point_mul (ecc-point-mul.c:57)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F5BA: _nettle_ecc_mod_inv (ecc-mod-inv.c:151)
==42307== by 0x48619DB: _nettle_ecc_j_to_a (ecc-j-to-a.c:70)
==42307== by 0x4867D54: nettle_ecc_point_mul (ecc-point-mul.c:57)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F66A: _nettle_ecc_mod_inv (ecc-mod-inv.c:154)
==42307== by 0x48619DB: _nettle_ecc_j_to_a (ecc-j-to-a.c:70)
==42307== by 0x4867D54: nettle_ecc_point_mul (ecc-point-mul.c:57)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F3F3: _nettle_ecc_mod_inv (ecc-mod-inv.c:138)
==42307== by 0x48619DB: _nettle_ecc_j_to_a (ecc-j-to-a.c:70)
==42307== by 0x4867D54: nettle_ecc_point_mul (ecc-point-mul.c:57)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x485F6BF: _nettle_ecc_mod_inv (ecc-mod-inv.c:156)
==42307== by 0x48619DB: _nettle_ecc_j_to_a (ecc-j-to-a.c:70)
==42307== by 0x4867D54: nettle_ecc_point_mul (ecc-point-mul.c:57)
==42307== by 0x4012EB: main (ecc-test.c:36)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x492EE5C: __gmpz_limbs_finish (in /usr/lib64/libgmp.so.10.3.2)
==42307== by 0x485E66A: _nettle_mpz_set_n (gmp-glue.c:111)
==42307== by 0x4867A80: nettle_ecc_point_get (ecc-point.c:131)
==42307== by 0x40131A: main (ecc-test.c:41)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x492EE54: __gmpz_limbs_finish (in /usr/lib64/libgmp.so.10.3.2)
==42307== by 0x485E66A: _nettle_mpz_set_n (gmp-glue.c:111)
==42307== by 0x4867A80: nettle_ecc_point_get (ecc-point.c:131)
==42307== by 0x40131A: main (ecc-test.c:41)
==42307==
==42307== Use of uninitialised value of size 8
==42307== at 0x492EE54: __gmpz_limbs_finish (in /usr/lib64/libgmp.so.10.3.2)
==42307== by 0x485E66A: _nettle_mpz_set_n (gmp-glue.c:111)
==42307== by 0x4867A80: nettle_ecc_point_get (ecc-point.c:131)
==42307== by 0x40131A: main (ecc-test.c:41)
==42307==
==42307== Use of uninitialised value of size 8
==42307== at 0x492EE56: __gmpz_limbs_finish (in /usr/lib64/libgmp.so.10.3.2)
==42307== by 0x485E66A: _nettle_mpz_set_n (gmp-glue.c:111)
==42307== by 0x4867A80: nettle_ecc_point_get (ecc-point.c:131)
==42307== by 0x40131A: main (ecc-test.c:41)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x492EE5C: __gmpz_limbs_finish (in /usr/lib64/libgmp.so.10.3.2)
==42307== by 0x485E66A: _nettle_mpz_set_n (gmp-glue.c:111)
==42307== by 0x4867AAE: nettle_ecc_point_get (ecc-point.c:133)
==42307== by 0x40131A: main (ecc-test.c:41)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x492EE54: __gmpz_limbs_finish (in /usr/lib64/libgmp.so.10.3.2)
==42307== by 0x485E66A: _nettle_mpz_set_n (gmp-glue.c:111)
==42307== by 0x4867AAE: nettle_ecc_point_get (ecc-point.c:133)
==42307== by 0x40131A: main (ecc-test.c:41)
==42307==
==42307== Use of uninitialised value of size 8
==42307== at 0x492EE54: __gmpz_limbs_finish (in /usr/lib64/libgmp.so.10.3.2)
==42307== by 0x485E66A: _nettle_mpz_set_n (gmp-glue.c:111)
==42307== by 0x4867AAE: nettle_ecc_point_get (ecc-point.c:133)
==42307== by 0x40131A: main (ecc-test.c:41)
==42307==
==42307== Use of uninitialised value of size 8
==42307== at 0x492EE56: __gmpz_limbs_finish (in /usr/lib64/libgmp.so.10.3.2)
==42307== by 0x485E66A: _nettle_mpz_set_n (gmp-glue.c:111)
==42307== by 0x4867AAE: nettle_ecc_point_get (ecc-point.c:133)
==42307== by 0x40131A: main (ecc-test.c:41)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x401320: main (ecc-test.c:42)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x401327: main (ecc-test.c:42)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x401347: main (ecc-test.c:43)
==42307==
==42307== Conditional jump or move depends on uninitialised value(s)
==42307== at 0x40134E: main (ecc-test.c:43)
==42307==
==42307==
==42307== HEAP SUMMARY:
==42307== in use at exit: 0 bytes in 0 blocks
==42307== total heap usage: 11 allocs, 11 frees, 2,304 bytes allocated
==42307==
==42307== All heap blocks were freed -- no leaks are possible
==42307==
==42307== Use --track-origins=yes to see where uninitialised values come from
==42307== For lists of detected and suppressed errors, rerun with: -s
==42307== ERROR SUMMARY: 6602 errors from 49 contexts (suppressed: 0 from 0)