diff --git a/Changelog.md b/Changelog.md index ceef24182..f669bfb20 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Add support for repairing cross compiled linux wheels in [#754](https://github.com/PyO3/maturin/pull/754) * Add support for `manylinux_2_28` and `manylinux_2_31` in [#755](https://github.com/PyO3/maturin/pull/755) +* Remove existing so file first in `maturin develop` command to avoid triggering SIGSEV in running process in [#760](https://github.com/PyO3/maturin/pull/760) ## [0.12.5] - 2021-12-20 diff --git a/src/module_writer.rs b/src/module_writer.rs index 652acfdd5..f1f842c3f 100644 --- a/src/module_writer.rs +++ b/src/module_writer.rs @@ -628,6 +628,9 @@ pub fn write_bindings_module( if editable { let target = rust_module.join(&so_filename); + // Remove existing so file to avoid triggering SIGSEV in running process + // See https://github.com/PyO3/maturin/issues/758 + let _ = fs::remove_file(&target); fs::copy(&artifact, &target).context(format!( "Failed to copy {} to {}", artifact.display(),