Skip to content

Memory leak in algebraic_immunity of BooleanFunction class #14549

@sagetrac-okazymyrov

Description

@sagetrac-okazymyrov

On my Mac OS X 10.8.3 the code

from sage.crypto.boolean_function import BooleanFunction
s=[BooleanFunction(random_vector(GF(2),16).list()).algebraic_immunity() for g in xrange(100)]
s=[BooleanFunction(random_vector(GF(2),16).list()).algebraic_immunity() for g in xrange(100)]

takes around 5GB of RAM on each "s=..." part. You can repeat the procedure for new 5GB.

Without algebraic_immunity function, the problem disappears.

The actual leak happens in BooleanPolynomialRing, see the below discussion. For this instance, the leak can be somewhat prevented, by using the constructor factory for BooleanPolynomialRing.

Component: cryptography

Keywords: algebraic_immunity, BooleanFunction

Author: Friedrich Wiemer

Branch/Commit: b350237

Reviewer: Martin Albrecht

Issue created by migration from https://trac.sagemath.org/ticket/14549

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions