SwiftArena and invoking destroy on objects as arena is destroyed#67
Conversation
| import org.swift.swiftkit.SwiftArena; | ||
| import org.swift.swiftkit.SwiftKit; | ||
|
|
||
| import org.swift.swiftkit.SwiftValueWitnessTable; |
There was a problem hiding this comment.
Moved some functionality out of SwiftKit, keeping it for things end users might wanna use.
| import org.junit.jupiter.api.Assertions; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| public class SwiftRuntimeMetadataTest { |
There was a problem hiding this comment.
made these into tests rather than just one off prints in main()
0ec066b to
bb48895
Compare
|
Heh I don't understand why the Java/Linux crash, local linux build is happy. I'll have to revisit this later |
29225bc to
aa988b1
Compare
|
Un-reproducible issues in CI which now manifest as hangs, quite a kerfuffle but I'll figure it out. |
|
So this reproduces only specifically in when running github actions, including using |
|
Specifically x86 has some issue with the witness table call and we just hang on: trying to debug on a linux amd64 host, we'll see if I can find out what's up |
It's useful to keep the exact same pattern everywhere as it's so repetetive code.
Previously this was just in a hello world app.
|
I disabled the hanging test on x86_64 so we can revisit it, I don't have good ideas what might cause that right now. We'll have to dig deeper into it specifically. It's logged as: #97 Unblocking other progress by merging this for now though. |
Work in progress.
This will eventually allow us to bound lifetimes with a SwiftArena and sanitize that we don't "leak" objects in native by retaining them longer than intended.