Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1169
Closed
Open
Issue created Jan 12, 2019 by Admin@OpenFOAM-adminMaintainer

BUG: Foam::dlLibraryTable::open leaks memory

Detected using v1806 on the Linux Subsystem in Windows 10. My spontaneous guess is that the issue is the handling of the pointer declared on line 91 in the dlLibraryTable.C

void* ptr = dlOpen(fileName(libName).expand(), verbose);

Reproducing:

  • Go to the channel395 tutorial. Run blockMesh. Set endTime to 0.2 to run 1 timeStep.
  • Run valgrind pimpleFoam. Observe that you have a leak.
  • Add enabled false; to the fieldAverage function object. Now libFieldFunctionObjects.so will not be loaded. Rerun and observe that there is no leak.
  • Add libs() to the controlDict and load either an existing library e.g. libOpenFOAM.so or a nonexistent banana.so.
  • Run valgrind --leak-check=full --show-leak-kinds=all pimpleFoam. Observe a leak, and that things point to dlOpen.
Edited Jan 12, 2019 by Admin
Assignee
Assign to
Time tracking