committed by
Michael Vines
parent
ef626e144d
commit
a09e8397fb
@@ -22,7 +22,7 @@ sha3 = "0.9.1"
|
||||
solana-measure = { path = "../../measure", version = "=1.8.11" }
|
||||
solana-runtime = { path = "../../runtime", version = "=1.8.11" }
|
||||
solana-sdk = { path = "../../sdk", version = "=1.8.11" }
|
||||
solana_rbpf = "=0.2.11"
|
||||
solana_rbpf = "=0.2.12"
|
||||
thiserror = "1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#![allow(clippy::integer_arithmetic)]
|
||||
pub mod alloc;
|
||||
pub mod allocator_bump;
|
||||
pub mod bpf_verifier;
|
||||
pub mod deprecated;
|
||||
pub mod serialization;
|
||||
pub mod syscalls;
|
||||
@@ -10,7 +9,6 @@ pub mod upgradeable_with_jit;
|
||||
pub mod with_jit;
|
||||
|
||||
use crate::{
|
||||
bpf_verifier::VerifierError,
|
||||
serialization::{deserialize_parameters, serialize_parameters},
|
||||
syscalls::SyscallError,
|
||||
};
|
||||
@@ -22,6 +20,7 @@ use solana_rbpf::{
|
||||
error::{EbpfError, UserDefinedError},
|
||||
memory_region::MemoryRegion,
|
||||
static_analysis::Analysis,
|
||||
verifier::{self, VerifierError},
|
||||
vm::{Config, EbpfVm, Executable, InstructionMeter},
|
||||
};
|
||||
use solana_runtime::message_processor::MessageProcessor;
|
||||
@@ -100,8 +99,8 @@ pub fn create_executor(
|
||||
let (_, elf_bytes) = executable
|
||||
.get_text_bytes()
|
||||
.map_err(|e| map_ebpf_error(invoke_context, e))?;
|
||||
bpf_verifier::check(elf_bytes)
|
||||
.map_err(|e| map_ebpf_error(invoke_context, EbpfError::UserError(e)))?;
|
||||
verifier::check(elf_bytes)
|
||||
.map_err(|e| map_ebpf_error(invoke_context, EbpfError::UserError(e.into())))?;
|
||||
executable.set_syscall_registry(syscall_registry);
|
||||
if use_jit {
|
||||
if let Err(err) = executable.jit_compile() {
|
||||
@@ -1067,12 +1066,12 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(expected = "VerifierError(LDDWCannotBeLast)")]
|
||||
#[should_panic(expected = "LDDWCannotBeLast")]
|
||||
fn test_bpf_loader_check_load_dw() {
|
||||
let prog = &[
|
||||
0x18, 0x00, 0x00, 0x00, 0x88, 0x77, 0x66, 0x55, // first half of lddw
|
||||
];
|
||||
bpf_verifier::check(prog).unwrap();
|
||||
verifier::check(prog).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user