Skip to content

Commit

Permalink
Merge pull request #269 from athenavm/removing-MockHost-from-athena-i…
Browse files Browse the repository at this point in the history
…nterface

remove MockHost from athena-interface
  • Loading branch information
poszu authored Jan 3, 2025
2 parents 8a10e23 + 6a21102 commit 0e6dd68
Show file tree
Hide file tree
Showing 23 changed files with 512 additions and 1,016 deletions.
69 changes: 36 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions core/src/disassembler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ impl Program {
/// Disassemble an ELF to a program that be executed by the VM.
pub fn from(input: &[u8]) -> anyhow::Result<Self> {
// Check the magic number
if input.len() < 4 {
panic!("malformed input");
} else if &input[0..4] == b"\x7fELF" {
anyhow::ensure!(input.len() >= 4);
if &input[0..4] == b"\x7fELF" {
// Decode the bytes as an ELF.
let elf = Elf::decode(input).context("decoding ELF")?;

Expand Down
4 changes: 2 additions & 2 deletions examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0e6dd68

Please sign in to comment.