Skip to content

Call deleteInstance before deleting oldType - #2174

Open
stanbot8 wants to merge 1 commit into
nasa:masterfrom
stanbot8:draft/allocinfo-lifetime-order
Open

Call deleteInstance before deleting oldType#2174
stanbot8 wants to merge 1 commit into
nasa:masterfrom
stanbot8:draft/allocinfo-lifetime-order

Conversation

@stanbot8

@stanbot8 stanbot8 commented Aug 1, 2026

Copy link
Copy Markdown

AllocInfo::resize destroys oldType before invoking deleteInstance.

Call deleteInstance before deleting oldType.

@stanbot8
stanbot8 marked this pull request as ready for review August 1, 2026 03:37
@stanbot8 stanbot8 changed the title Call deleteInstance before deleting the associated type object Call deleteInstance before deleting oldType Aug 1, 2026
@brendan-nasa

brendan-nasa commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for the bug report (and fix)! In the interest of investigating further, did you encounter any crashes/run time errors that you traced back to these few lines?

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 56.671%. remained the same — stanbot8:draft/allocinfo-lifetime-order into nasa:master

@stanbot8

stanbot8 commented Aug 3, 2026

Copy link
Copy Markdown
Author

Hi Brendan, I was actually investigating a separate memory issue across my project's dependencies. I wrote a script that scans for suspicious patterns and this showed up alongside six other candidates. One of the other candidates turned out to be the culprit, but this looked worth submitting separately. I believe most Trick users won't encounter this issue, but the DataTypes test was updated last year so somebody might still be maintaining or using it.

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.

3 participants