Skip to content

Fix potential GC bug when expiring the caller#162

Merged
saulecabrera merged 1 commit intomainfrom
fix-caller-expire-gc-bug
Mar 31, 2023
Merged

Fix potential GC bug when expiring the caller#162
saulecabrera merged 1 commit intomainfrom
fix-caller-expire-gc-bug

Conversation

@jbourassa
Copy link
Copy Markdown
Collaborator

The compiler may not keep the Caller's VALUE on the stack as we're not using it explicitly. Object allocations can thus cause the Caller to get GC'd, resulting in a segfault when we later try to expire it.

See #156 (comment) and #158 for investigation.

Fixes #156

The compiler may not keep the Caller's VALUE on the stack as we're
not using it explicitly. Object allocations can thus cause the Caller
to get GC'd, resulting in a segfault when we later try to `expire` it.

Fixes #156
@jbourassa jbourassa requested review from ianks and saulecabrera March 31, 2023 15:33
@saulecabrera
Copy link
Copy Markdown
Member

Great investigation! Thanks @jbourassa and @ianks!

Regarding #158, I think it's still worth moving on with some parts of that change? e.g. implementing Copy for Param?

@saulecabrera saulecabrera merged commit 9f7f2f2 into main Mar 31, 2023
@saulecabrera saulecabrera deleted the fix-caller-expire-gc-bug branch March 31, 2023 17:52
@jbourassa
Copy link
Copy Markdown
Collaborator Author

Regarding #158, I think it's still worth moving on with some parts of that change? e.g. implementing Copy for Param?

Yes, I want to dive deeper into those 2 changes. I think marking the exception is unnecessary.

Now that this pesky segfault is behind us, I'll look into 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.

Segfault on macOS in Func error handling

2 participants