Pull in solana_rbpf v0.1.14 (#5609)

This commit is contained in:
Jack May
2019-08-23 11:03:53 -07:00
committed by GitHub
parent 52f6da5cee
commit 97ea75a890
12 changed files with 140 additions and 269 deletions

View File

@ -5,7 +5,7 @@ use core::ptr;
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
// Message is ignored for now to avoid incurring formatting program size overhead
// Message is ignored for now to avoid incurring formatting overhead
match info.location() {
Some(location) => {
let mut file: [u8; 128] = [0; 128];
@ -18,14 +18,15 @@ fn panic(info: &PanicInfo) -> ! {
unsafe {
sol_panic_(
file.as_ptr(),
file.len() as u64,
u64::from(location.line()),
u64::from(location.column()),
);
}
}
None => unsafe { sol_panic_(ptr::null(), 0, 0) },
None => unsafe { sol_panic_(ptr::null(), 0, 0, 0) },
}
}
extern "C" {
pub fn sol_panic_(file: *const u8, line: u64, column: u64) -> !;
pub fn sol_panic_(file: *const u8, len: u64, line: u64, column: u64) -> !;
}