From: Jakub Jirutka Date: Fri, 21 Jul 2023 13:24:48 +0200 Subject: [PATCH] Disable guess_os_stack_limit on musl This is a workaround for some memory bug in deno. Without this patch, the following tests fails on stack overflow: - integration::node_unit_tests::_fs_chmod_test - integration::node_unit_tests::_fs_read_test - integration::node_unit_tests::_fs_readlink_test - integration::node_unit_tests::_fs_stat_test - integration::npm::esm_module - integration::run::_045_proxy See https://github.com/rust-lang/stacker/pull/51 diff --git a/src/lib.rs b/src/lib.rs index 3c1d889..a75a361 100644 --- a/vendor/stacker/src/lib.rs +++ b/vendor/stacker/src/lib.rs @@ -414,7 +414,7 @@ ); Some(mi.assume_init().AllocationBase as usize + get_thread_stack_guarantee() + 0x1000) } - } else if #[cfg(any(target_os = "linux", target_os="solaris", target_os = "netbsd"))] { + } else if #[cfg(any(all(target_os = "linux", target_env = "gnu"), target_os="solaris", target_os = "netbsd"))] { unsafe fn guess_os_stack_limit() -> Option { let mut attr = std::mem::MaybeUninit::::uninit(); assert_eq!(libc::pthread_attr_init(attr.as_mut_ptr()), 0);