Building rust programs on ZFSonOSX somtimes leads to corrupted MachO file

Scenario:

Create a rust project on a ZFS, make some random changes and run cargo run multiple times, then some random problem sometimes appears:

   Compiling example v0.1.0 (/Volumes/Data/example)
    Finished dev [unoptimized + debuginfo] target(s) in 0.29s
     Running `target/debug/example`
dyld: REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment 12 which is too large (0..3) in /Volumes/Data/example/target/debug/example
fish: 'cargo run' terminated by signal SIGABRT (Abort)
   Compiling example v0.1.0 (/Volumes/Data/example)
    Finished dev [unoptimized + debuginfo] target(s) in 0.32s
     Running `target/debug/example`
fish: 'cargo run' terminated by signal SIGSEGV (Address boundary error)
fish: 'cargo run --release' terminated by signal SIGILL (Illegal instruction)

And multiple crash logs can be found for llvm-dsymutil called by rustc.

Tested with rustc 1.32.0 and nightly 2019-01-01, both the same problem. Moving the project into a APFS partition solved the problem. So this seems to be ZFSonOSX-only.

Has anyone went into the same problem with me? Should I report it to rust?

Sounds like you should report it to ZFS on OSX.

FWIW, I don't see any of this using ZFS on Linux or Illumos (SmartOS).