Hi! I was considering using cranelift's acyclic egraph code for an independent project of mine. I found the cranelift-egraph
crate, then looked at the API exposed and went "hold on, there's no way this is sound", and while getting ready to report a bug, I noticed that the crate got refactored out of existence, and the version on crates.io is just a stale snapshot from a while ago. Not ideal, but not sure what the best thing to do about it would be...
Cranelift-egraph was merged into cranelift-codegen.
Yeah, it'd be a good idea to mark the crate as deprecated on crates.io or something
It seems that BumpArena
itself, which was unsound, doesn't exist anymore at all?
It doesn't, that's correct. It might still be good to know what issue you found though, in case the code is ever reused for something?
well there was nothing preventing the use of a BumpVec
allocated in one arena with a different arena, leading to reads of uninitialized memory and other fun. I'd probably mark arena_with_capacity
as unsafe, making the caller ensure that there's exactly one arena of a given type "in context", whatever that would mean for the application
ah, right, we always held that invariant in practice; I agree we should have probably marked that with an unsafe
Last updated: Nov 22 2024 at 16:03 UTC