Skip to content

RDKB-65677 eliminate session_create leaks and strengthen regression coverage - #24

Merged
GoutamD2905 merged 2 commits into
developfrom
RDKB-65677-Medium
Jul 14, 2026
Merged

RDKB-65677 eliminate session_create leaks and strengthen regression coverage#24
GoutamD2905 merged 2 commits into
developfrom
RDKB-65677-Medium

Conversation

@pavankumar464

Copy link
Copy Markdown
Contributor

No description provided.

@pavankumar464
pavankumar464 requested a review from a team as a code owner June 23, 2026 11:14
Copilot AI review requested due to automatic review settings June 23, 2026 11:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses memory leaks in the session creation path and adds regression tests to ensure repeated session lifecycle calls behave as expected within the Duktape-based runtime.

Changes:

  • Fix session_create() leaks by handling allocation failures and freeing temporary/previously allocated session identifiers.
  • Add new gtest coverage for repeated ccsp_session.create() calls and create/destroy cycles, including basic session ID format assertions.
  • Update the test build to compile/link the session implementation into the parser_test binary.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
source/jst_session.c Frees session_id and replaces/leak-proofs session_identifier during create().
tests/parser_test.cpp Adds regression tests for repeated create() calls and create/destroy cycles using a Duktape heap.
tests/CMakeLists.txt Links jst_session.c into the test executable so the new tests can run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/jst_session.c
Comment thread tests/parser_test.cpp
Comment thread tests/parser_test.cpp
Comment thread tests/parser_test.cpp
@pavankumar464 pavankumar464 changed the title eliminate session_create leaks and strengthen regression coverage RDKB-65677 eliminate session_create leaks and strengthen regression coverage Jul 14, 2026
@GoutamD2905
GoutamD2905 merged commit 03a4cf2 into develop Jul 14, 2026
9 of 11 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
@pavankumar464
pavankumar464 deleted the RDKB-65677-Medium branch July 14, 2026 12:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants