julia
51941ed6 - Add missing root for method instances used in opaque closure (#50359)

Commit
2 years ago
Add missing root for method instances used in opaque closure (#50359) Usually the rooting path for method instances is something like this: Module -> DataType -> TypeName -> MethodTable -> Method -> MethodInstance so these MethodInstances are effectively globally rooted. However, the Method(instances) inside opaque closures do not have this rooting path and can be deleted. Unfortunately, if we codegen'ed these opaque closures, we do have a reference to the method instance in our global debuginfo tables. This was causing crashes in cases where the oc was gc'ed before a stack trace could be printed. Fix that by adding any method instance that needs to be rooted to the global roots table. Reported by @staticfloat
Author
Loading