Skip to content

Memory leak in NC_reset_maxopenfiles #825

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

Closed
bmribler opened this issue Jun 6, 2025 · 0 comments
Closed

Memory leak in NC_reset_maxopenfiles #825

bmribler opened this issue Jun 6, 2025 · 0 comments
Assignees
Labels
Component - C Library Core C library issues Priority - 0. Blocker ⛔ This MUST be merged for the release to happen Type - Bug Please report security issues to [email protected] instead of creating an issue on GitHub

Comments

@bmribler
Copy link
Collaborator

bmribler commented Jun 6, 2025

==687765== 8,168 bytes in 1 blocks are still reachable in loss record 35 of 35
==687765== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==687765== by 0x148CF4: NC_reset_maxopenfiles (file.c:137)
==687765== by 0x149143: NC_open (file.c:265)
==687765== by 0x1492A5: nccreate (file.c:304)
==687765== by 0x14F363: SDstart (mfsd.c:319)
==687765== by 0x129238: test_max_open_files (tfile.c:260)
==687765== by 0x129B7E: test_files (tfile.c:442)
==687765== by 0x111C43: main (hdftest.c:1310)

@bmribler bmribler changed the title Memory leak in Memory leak in NC_reset_maxopenfiles Jun 6, 2025
bmribler added a commit to bmribler/hdf4 that referenced this issue Jun 6, 2025
- An if statement used the water mark variable instead of the number of opened
  files to determine when to release the list of file structs.  As a result,
  sometime the list was never released.  Fixed to use the correct variable.
- After that fix, some tests produced segfault because there was an extra call
  to release the list of file structs.  The extra code was removed.
- Other code tidying

This PR addressed HDFGroupGH-825
@bmribler bmribler added Component - C Library Core C library issues Type - Bug Please report security issues to [email protected] instead of creating an issue on GitHub Priority - 0. Blocker ⛔ This MUST be merged for the release to happen labels Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - C Library Core C library issues Priority - 0. Blocker ⛔ This MUST be merged for the release to happen Type - Bug Please report security issues to [email protected] instead of creating an issue on GitHub
Projects
None yet
Development

No branches or pull requests

1 participant