rust - Write::write_fmt doesn't work properly on bare metal -
on x86_64 architectures, write!
macro works expected string arguments, not integers. when integer argument used, strange loop (e.g. write!(writer, "hello {}!", 123)
produces infinite "hello hello hello..."). on aarch64, write!
macro not work @ all.
i build libcore using following command:
rustc -c opt-level=3 -z no-landing-pads -c no-stack-check \ --crate-type rlib --target {arch}-unknown-linux-gnu lib.rs
where {arch}
respectively x86_64
or aarch64
.
my code built using same code generation options. libcore version corresponds compiler. problematic code here. can suggest possible cause of problem?
important updates:
here more distilled code. libcore built within project under control. loop above comes machine rebooting. code works on aarch64 strangely crashes inside write::write_fmt on x86_64. checked startup assembly - doesn't seem have errors there.
Comments
Post a Comment