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

Catch failed calls to classdb_get_method_bind() #216

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Apr 5, 2023

When Godot fails to provide a method (e.g. invalid hash), this FFI method returns a null pointer. Instead of UB from dereferencing that pointer, a panic is now caused.

Found as a result of godotengine/godot#75779.

When Godot fails to provide a method (e.g. invalid hash), this FFI method returned a null pointer.
Instead of UB dereferencing that pointer, a panic is now caused.
@Bromeon Bromeon added bug c: engine Godot classes (nodes, resources, ...) labels Apr 5, 2023
@Bromeon
Copy link
Member Author

Bromeon commented Apr 5, 2023

bors try

bors bot added a commit that referenced this pull request Apr 5, 2023
@bors
Copy link
Contributor

bors bot commented Apr 5, 2023

try

Build succeeded:

@Bromeon
Copy link
Member Author

Bromeon commented Apr 10, 2023

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 10, 2023

Build succeeded:

@bors bors bot merged commit 558a6d3 into master Apr 10, 2023
@bors bors bot deleted the bugfix/failed-method-bind branch April 10, 2023 15:00
@Bromeon Bromeon added the ub Undefined behavior label Jul 18, 2023
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.

1 participant