Skip to content

Commit

Permalink
Merge pull request #760 from messense/remove-existing-so
Browse files Browse the repository at this point in the history
Remove existing so file first to avoid triggering SIGSEV in running process
  • Loading branch information
messense committed Dec 31, 2021
2 parents 4b9f622 + 3f0a400 commit 4bce99a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions src/module_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 4bce99a

Please sign in to comment.