File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
itest/rust/src/object_tests Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,9 @@ pub unsafe fn as_storage<'u, T: GodotClass>(
343
343
pub unsafe fn destroy_storage < T : GodotClass > ( instance_ptr : sys:: GDExtensionClassInstancePtr ) {
344
344
let raw = instance_ptr as * mut InstanceStorage < T > ;
345
345
346
+ // The following caused UB in 4.0.4 itests, only on Linux. Debugging was not conclusive; would need more time.
347
+ // Since it doesn't occur in 4.1+, we disable it -- time can be spent better on newer versions.
348
+ #[ cfg( since_api = "4.1" ) ]
346
349
assert ! (
347
350
!( * raw) . is_bound( ) ,
348
351
"tried to destroy object while a bind() or bind_mut() call is active\n \
Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ fn object_user_free_during_bind() {
268
268
obj. free ( ) ; // now succeeds
269
269
}
270
270
271
+ #[ cfg( since_api = "4.1" ) ] // See destroy_storage() comment.
271
272
#[ itest]
272
273
fn object_user_dynamic_free_during_bind ( ) {
273
274
// Note: we could also test if GDScript can access free() when an object is bound, to check whether the panic is handled or crashes
You can’t perform that action at this time.
0 commit comments