Skip to content

Fix unclosed ReadOnlyTransaction not detected when passed as function argument#70

Draft
uji wants to merge 1 commit into
gcpug:mainfrom
uji:fix/49
Draft

Fix unclosed ReadOnlyTransaction not detected when passed as function argument#70
uji wants to merge 1 commit into
gcpug:mainfrom
uji:fix/49

Conversation

@uji
Copy link
Copy Markdown

@uji uji commented Mar 8, 2026

Fixes #49

  • analysisutil.NotCalledIn internally skips transactions passed as function arguments (due to its isArg check), causing unclosed ReadOnlyTransaction to go undetected when passed to another function
  • Added findArgPassedUnclosedTx to complement NotCalledIn by specifically detecting unclosed transactions that are passed as arguments

analysisutil.NotCalledIn skips transactions passed as arguments due to
its internal isArg check. Add findArgPassedUnclosedTx to complement it
by detecting cases where a transaction is passed to another function
but Close() is never called.

Fixes gcpug#49
@uji
Copy link
Copy Markdown
Author

uji commented Apr 25, 2026

found an issue, so I'm reverting it to draft.

@uji uji marked this pull request as draft April 25, 2026 04:40
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.

unclosetx: not detect when a function called with a ReadOnlyTransaction argument

1 participant