Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix user-after-free in AsObjectArg pass-by-value (in default-param methods) #846

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Aug 8, 2024

Fixes #835.
No longer causes UB when passing objects by value to engine methods that have default parameters.

Notably, this PR does not enforce borrowing/taking by reference (at least for now).

@Bromeon Bromeon added bug c: engine Godot classes (nodes, resources, ...) ub Undefined behavior labels Aug 8, 2024
@Bromeon Bromeon changed the title Bugfix/object arg values Fix user-after-free in AsObjectArg pass-by-value (in default-param methods) Aug 8, 2024
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-846

@Bromeon Bromeon force-pushed the bugfix/object-arg-values branch from 797d485 to 0315266 Compare August 8, 2024 21:42
@Bromeon Bromeon added this pull request to the merge queue Aug 8, 2024
Merged via the queue into master with commit 2d052a6 Aug 8, 2024
14 checks passed
@Bromeon Bromeon deleted the bugfix/object-arg-values branch August 8, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c: engine Godot classes (nodes, resources, ...) ub Undefined behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

impl AsObjectArg <T> makes T-object free
2 participants