Skip to content

Conversation

@Rua
Copy link
Contributor

@Rua Rua commented Nov 7, 2025

I opted to store the final strings as Vec<u8> rather than as CString, because the latter does not have a way to get a mutable pointer/reference without leaking it. This is because of the nul termination invariant that CString must uphold.

@Rua Rua force-pushed the main-leak branch 3 times, most recently from e309b65 to e10b712 Compare November 8, 2025 08:53
Copy link
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

Can you add a snapshot test for this, too?

@Rua Rua force-pushed the main-leak branch 2 times, most recently from 326ac44 to ba0f652 Compare November 11, 2025 09:04
Copy link
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

Sorry, can you also do the thing where the snapshot test is added first before the fix, then updated along with the fix? Thanks!

@kkysen kkysen self-requested a review November 16, 2025 01:19
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.

Generated wrapper main leaks memory of args

2 participants