Skip to content

Fix resource leak detection - #29

Merged
damaki merged 1 commit into
mainfrom
topic/fix-resource-leak-detection
Jun 15, 2026
Merged

Fix resource leak detection#29
damaki merged 1 commit into
mainfrom
topic/fix-resource-leak-detection

Conversation

@damaki

@damaki damaki commented Jun 15, 2026

Copy link
Copy Markdown
Owner

It turns out that transaction handle resource leaks were not being detected by GNATprove due to the use of general access types ("access all" type) internally to point to transaction data objects. Only pool-specific access types have resource leak detection in SPARK.

GNATprove was warning about possible resource leaks at the point where the pool-specific access was converted to a general access, but this was incorrectly believed to be safe, so the warning was suppressed. It turns out this was not safe and broke leak detection, so the use of general access types has now been removed in favour of pool-specific access types only to ensure resource leak detection works correctly on all handle types again.

It turns out that transaction handle resource leaks were not being detected
by GNATprove due to the use of general access types ("access all" type)
internally to point to transaction data objects. Only pool-specific access
types have resource leak detection in SPARK.

GNATprove was warning about possible resource leaks at the point where the
pool-specific access was converted to a general access, but this was incorrectly
believed to be safe, so the warning was suppressed. It turns out this was not
safe and broke leak detection, so the use of general access types has now
been removed in favour of pool-specific access types only to ensure resource
leak detection works correctly on all handle types again.
@damaki damaki self-assigned this Jun 15, 2026
@damaki damaki added the bug Something isn't working label Jun 15, 2026
@damaki
damaki merged commit 3381513 into main Jun 15, 2026
9 checks passed
@damaki
damaki deleted the topic/fix-resource-leak-detection branch June 15, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant