Long-time user, first-time poster.
I just ran valgrind on some FLINT-based C code and it seems to suggest a memory leak in fmpz_bin_uiui (binomial coefficients); see below for the relevant portion of the report. Rewriting to compute the binomial coefficients by hand makes the leak indication go away, suggesting an issue at the level of FLINT or lower; the FLINT code looks like a pretty thin boilerplate wrapper around a GMP function. Thoughts?
Kiran
==88545== 32,768 bytes in 1 blocks are still reachable in loss record 1 of 3
==88545== at 0x553BE1F: realloc (vg_replace_malloc.c:1801)
==88545== by 0x409DCE2: flint_realloc (memory_manager.c:106)
==88545== by 0x41E67D2: _fmpz_new_mpz (fmpz.c:133)
==88545== by 0x41E6B5D: _fmpz_promote (fmpz.c:228)
==88545== by 0x41E6B5D: _fmpz_promote (fmpz.c:224)
==88545== by 0x41DCF49: fmpz_bin_uiui (bin_uiui.c:18)
==88545== by 0x4055A20: ps_static_init (power_sums.c:285)
==88545== by 0x403441F: wp_rust::main (main.rs:61)