Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Memory Leak in ODDLParser During File Parsing #5934

Open
YancyLii opened this issue Dec 20, 2024 · 0 comments
Open

Bug: Memory Leak in ODDLParser During File Parsing #5934

YancyLii opened this issue Dec 20, 2024 · 0 comments
Labels
Bug Global flag to mark a deviation from expected behaviour

Comments

@YancyLii
Copy link

Describe the bug
A memory leak has been detected within the ODDLParser component of Assimp while parsing files. The leaks occur specifically in the parseName() and parseIdentifier() functions, leading to unreleased memory allocations, which accumulate over time and may impact application performance and stability.

To Reproduce
Test_assimp_leak4.tar.gz

  1. Download the tar.gz file and decompress it, then (sudo) execute shell script
  2. ./Test_assimp_leak4 leak-0f894c6c4932ec1dfeb6f6bb9a3c0b14f3e71c06
  3. Observe the error message

Expected behavior
When using the importer.ReadFileFromMemory() function, all memory allocated during the parsing process should be properly managed and freed upon completion to prevent memory leaks. Memory allocated for parsing nodes and names within ODDLParser should be appropriately released.

Screenshots
image

Platform (please complete the following information):

  • OS: ubuntu

Additional context
The bug was identified during a fuzz testing session aimed at identifying potential stability and security issues.
The memory leaks may not cause immediate crashes but could lead to degraded performance in long-running applications or applications that load multiple models.
This issue may affect all users of the library who utilize the OpenGEX format and similar parsing routines.

@YancyLii YancyLii added the Bug Global flag to mark a deviation from expected behaviour label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour
Projects
None yet
Development

No branches or pull requests

1 participant