8000 Backport #505 and #513 to v0.6 by Lichtso · Pull Request #516 · solana-labs/rbpf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Backport #505 and #513 to v0.6 #516

Merged
merged 2 commits into from
Sep 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1259,9 +1259,10 @@ impl<'a, V: Verifier, C: ContextObject> JitCompiler<'a, V, C> {

// Routine for allocating errors
self.set_anchor(ANCHOR_ALLOCATE_EXCEPTION);
unsafe fn allocate_error(result: &mut ProgramResult) -> *mut EbpfError {
unsafe fn allocate_error(result: *mut ProgramResult) -> *mut EbpfError {
let err_ptr = std::alloc::alloc(std::alloc::Layout::new::<EbpfError>()) as *mut EbpfError;
*result = ProgramResult::Err(Box::from_raw(err_ptr));
assert!(!err_ptr.is_null(), "std::alloc::alloc() failed");
result.write(ProgramResult::Err(Box::from_raw(err_ptr)));
err_ptr
}
self.emit_ins(X86Instruction::lea(OperandSize::S64, RBP, R10, Some(X86IndirectAccess::Offset(self.slot_on_environment_stack(RuntimeEnvironmentSlot::ProgramResult)))));
Expand Down
0