diff --git a/no_std_test/src/main.rs b/no_std_test/src/main.rs index fbf87a53f..58e5c9ca4 100644 --- a/no_std_test/src/main.rs +++ b/no_std_test/src/main.rs @@ -53,6 +53,7 @@ use core::intrinsics; use core::panic::PanicInfo; use secp256k1::ecdh::SharedSecret; +use secp256k1::ffi::types::AlignedType; use secp256k1::rand::{self, RngCore}; use secp256k1::serde::Serialize; use secp256k1::*; @@ -82,7 +83,7 @@ impl RngCore for FakeRng { #[start] fn start(_argc: isize, _argv: *const *const u8) -> isize { - let mut buf = [0u8; 600_000]; + let mut buf = [AlignedType::zeroed(); 37_000]; let size = Secp256k1::preallocate_size(); unsafe { libc::printf("needed size: %d\n\0".as_ptr() as _, size) }; @@ -161,5 +162,5 @@ fn panic(info: &PanicInfo) -> ! { let mut buf = Print::new(); write(&mut buf, *msg).unwrap(); buf.print(); - unsafe { intrinsics::abort() } + intrinsics::abort() }