This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #33210: fix uninitialized pointer use in polynomial_modn_dense_n…
…tl.pyx. Cython is kind enough to point out the following, warning: sage/rings/polynomial/polynomial_modn_dense_ntl.pyx:876:32: local variable 'mod' referenced before assignment which references the following (paraphrased) code: cdef zz_pX_Modulus_c *mod zz_pX_Modulus_build(mod[0], (<Polynomial_dense_modn_ntl_zz>modulus).x) That's declaring a pointer "mod", and then overwriting the structure that it points to with pre-computed information about "modulus.x". But where does "mod" point? Instead, the first line should be allocating space for a structure that can then be passed by reference directly (i.e. without indexing) to zz_pX_Modulus_build. This fix is made in two places, and as a side-effect, eliminates the Cython warnings.
- Loading branch information