Skip to content

Fix remaining C++ memory leak paths - #881

Open
ColinLeeo wants to merge 1 commit into
apache:developfrom
ColinLeeo:fix/cpp-memory-leak-followups
Open

Fix remaining C++ memory leak paths#881
ColinLeeo wants to merge 1 commit into
apache:developfrom
ColinLeeo:fix/cpp-memory-leak-followups

Conversation

@ColinLeeo

Copy link
Copy Markdown
Contributor

Summary

  • preserve the original allocation when mem_realloc fails in containers, tablets, and chunk readers
  • release reader and compressor buffers on early error paths, and clear cached LZO ownership after caller release
  • free aligned value buffers during reset and keep wrapped stream pointers synchronized after realloc
  • add deterministic realloc-failure injection and regression coverage for every repaired ownership path

This is a follow-up to #879.

Testing

  • ./mvnw spotless:check -P with-cpp
  • CMake Debug build of TsFile_Test
  • targeted allocation-failure tests: 10 passed
  • complete C++ test suite: 731 passed, 10 disabled
  • Release tsfile library build with BUILD_TEST=OFF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant