diff --git a/CHANGELOG.md b/CHANGELOG.md index 6549c4ab461..e84a53782bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C ## **Unreleased** +## Fixed + + - [#3439](https://github.com/wasmerio/wasmer/pull/3439) Use GNU/Linux frame registration code for FreeBSD too + ## 3.1.0 - 12/12/2022 ## Added diff --git a/lib/compiler/src/engine/unwind/systemv.rs b/lib/compiler/src/engine/unwind/systemv.rs index 1b2cd180d6a..38d51e219f4 100644 --- a/lib/compiler/src/engine/unwind/systemv.rs +++ b/lib/compiler/src/engine/unwind/systemv.rs @@ -60,7 +60,10 @@ impl UnwindRegistry { #[allow(clippy::cast_ptr_alignment)] unsafe fn register_frames(&mut self, eh_frame: &[u8]) { - if cfg!(all(target_os = "linux", target_env = "gnu")) { + if cfg!(any( + all(target_os = "linux", target_env = "gnu"), + target_os = "freebsd" + )) { // Registering an empty `eh_frame` (i.e. which // contains empty FDEs) cause problems on Linux when // deregistering it. We must avoid this