I have an enum in my program. One variant holds a string, the other 8 of them are empty. I am getting all sorts of issues around the same routine. In some cases, I try to clone or even debug-print it, and the program segfaults. In others, my debug statements print a variant that is never constructed in the program. I have hooked it up to lldb, and it is always in the same spot, with the same variants doing this, and the segfault is definitely in the derived clone or debug impls. There is no unsafe code in this part of my program, it's simply constructing a Vec-recursive data structure with
Option<this enum> in the leaf nodes, and then walking it to produce another structure.
I have discovered that when compiled with an old rust nightly (
nightly-2020-04-30-x86_64-apple-darwin - rustc 1.45.0-nightly (fa51f810e 2020-04-29)), it does not have this issue. But somewhere along the line, before nightly-2020-09-11, this started happening.
What's the right process for this? My code is open source, but it takes a while to build, and I don't really have the time to bisect the nightlies since April to figure out when this was introduced. I do have a minimal test input to my program that reliably segfaults. Should I file a rust-lang/rust issue? Will someone there have the CI time to pin down a nightly?
(Edit: I should add that it only happens in release mode.)