Skip to content

Investigate memory problem while running unit tests linked with Emscripten #249

Open
@dsuponitskiy

Description

@dsuponitskiy
  1. Link OpenFHE with Emscripten and -DNATIVE_SIZE=64
  2. Run node ./unittest/pke_tests.js on a Ubuntu machine with 16GB or 32GB RAM

Unittests in src/pke/unittest/utckksrns/UnitTestCKKSrns.cpp (EVAL_FAST_ROTATION_41 and all others after it) and src/pke/unittest/utckksrns/UnitTestCKKSrnsSerialize.cpp (CONTEXT_WITH_SERTYPE) fail because of lack of memory. Example:
"Exception thrown from UnitTest_EvalFastRotation(): std::bad_alloc" for EVAL_FAST_ROTATION_41.

It is most likely because of the cryptocontext memory not cleared after the previous test cases (could be cryptocontext's static data members).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions