Gray Paper 0.8 removed the SBRK instruction for the hostcall grow_heap. The allocator relies on sbrk here for its initial slab.
|
fn sbrk(size: usize) -> *mut u8 { |
|
// SAFETY: Allocating memory is always safe. |
|
unsafe { |
|
let address; |
|
core::arch::asm!( |
|
".insn r 0xb, 1, 0, {dst}, {size}, zero", |
I will hack it to make my Service SDK work again with GP0.8, but maybe a better long term fix would be possible.
PS: I just saw the sbrk from musl, so will assume that it always links against that and use it.
Gray Paper 0.8 removed the SBRK instruction for the hostcall
grow_heap. The allocator relies on sbrk here for its initial slab.picoalloc/src/env/polkavm.rs
Lines 5 to 10 in 5645661
I will hack it to make my Service SDK work again with GP0.8, but maybe a better long term fix would be possible.
PS: I just saw the
sbrkfrom musl, so will assume that it always links against that and use it.