Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Bump solana_rbpf to v0.2.39 (#30398)
Browse files Browse the repository at this point in the history
* Bump solana_rbpf to v0.2.39

* Adds MemoryRegion::vm_addr_end.
  • Loading branch information
Lichtso authored Feb 21, 2023
1 parent 22f6dfd commit 4bfcbf7
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ solana-tpu-client = { path = "../tpu-client", version = "=1.16.0" }
solana-transaction-status = { path = "../transaction-status", version = "=1.16.0" }
solana-version = { path = "../version", version = "=1.16.0" }
solana-vote-program = { path = "../programs/vote", version = "=1.16.0" }
solana_rbpf = "=0.2.38"
solana_rbpf = "=0.2.39"
spl-memo = { version = "=3.0.1", features = ["no-entrypoint"] }
thiserror = "1.0.31"
tiny-bip39 = "0.8.2"
Expand Down
2 changes: 1 addition & 1 deletion program-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.16.0" }
solana-measure = { path = "../measure", version = "=1.16.0" }
solana-metrics = { path = "../metrics", version = "=1.16.0" }
solana-sdk = { path = "../sdk", version = "=1.16.0" }
solana_rbpf = "=0.2.38"
solana_rbpf = "=0.2.39"
thiserror = "1.0"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion programs/bpf_loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ solana-measure = { path = "../../measure", version = "=1.16.0" }
solana-program-runtime = { path = "../../program-runtime", version = "=1.16.0" }
solana-sdk = { path = "../../sdk", version = "=1.16.0" }
solana-zk-token-sdk = { path = "../../zk-token-sdk", version = "=1.16.0" }
solana_rbpf = "=0.2.38"
solana_rbpf = "=0.2.39"
thiserror = "1.0"

[dev-dependencies]
Expand Down
45 changes: 45 additions & 0 deletions programs/bpf_loader/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,7 @@ mod tests {
vec![MemoryRegion {
host_addr: addr,
vm_addr: 0x100000000,
vm_addr_end: 0x100000000_u64.saturating_add(std::mem::size_of::<Pubkey>() as u64),
len: std::mem::size_of::<Pubkey>() as u64,
vm_gap_shift: 63,
is_writable: false,
Expand All @@ -1943,6 +1944,7 @@ mod tests {
let mut memory_region = MemoryRegion {
host_addr: addr,
vm_addr: 0x100000000,
vm_addr_end: 0x100000000_u64.saturating_add(std::mem::size_of::<Instruction>() as u64),
len: std::mem::size_of::<StableInstruction>() as u64,
vm_gap_shift: 63,
is_writable: false,
Expand Down Expand Up @@ -1975,6 +1977,7 @@ mod tests {
vec![MemoryRegion {
host_addr: addr,
vm_addr: 0x100000000,
vm_addr_end: 0x100000000_u64.saturating_add(good_data.len() as u64),
len: good_data.len() as u64,
vm_gap_shift: 63,
is_writable: false,
Expand All @@ -1994,6 +1997,7 @@ mod tests {
vec![MemoryRegion {
host_addr: addr,
vm_addr: 0x100000000,
vm_addr_end: 0x100000000_u64.saturating_add(data.len() as u64),
len: data.len() as u64,
vm_gap_shift: 63,
is_writable: false,
Expand Down Expand Up @@ -2028,6 +2032,7 @@ mod tests {
vec![MemoryRegion {
host_addr: addr,
vm_addr: 0x100000000,
vm_addr_end: 0x100000000_u64.saturating_add((data.len() * size_of::<u64>()) as u64),
len: (data.len() * size_of::<u64>()) as u64,
vm_gap_shift: 63,
is_writable: false,
Expand All @@ -2052,6 +2057,8 @@ mod tests {
vec![MemoryRegion {
host_addr: addr,
vm_addr: 0x100000000,
vm_addr_end: 0x100000000_u64
.saturating_add((data.len() * std::mem::size_of::<Pubkey>()) as u64),
len: (data.len() * std::mem::size_of::<Pubkey>()) as u64,
vm_gap_shift: 63,
is_writable: false,
Expand All @@ -2077,6 +2084,7 @@ mod tests {
host_addr: addr,
vm_addr: 0x100000000,
len: string.len() as u64,
vm_addr_end: 0x100000000_u64.saturating_add(string.len() as u64),
vm_gap_shift: 63,
is_writable: false,
}],
Expand Down Expand Up @@ -2143,6 +2151,7 @@ mod tests {
host_addr: addr,
vm_addr: 0x100000000,
len: string.len() as u64,
vm_addr_end: 0x100000000_u64.saturating_add(string.len() as u64),
vm_gap_shift: 63,
is_writable: false,
}],
Expand Down Expand Up @@ -2201,6 +2210,7 @@ mod tests {
host_addr: addr,
vm_addr: 0x100000000,
len: string.len() as u64,
vm_addr_end: 0x100000000_u64.saturating_add(string.len() as u64),
vm_gap_shift: 63,
is_writable: false,
}],
Expand Down Expand Up @@ -2328,6 +2338,7 @@ mod tests {
host_addr: addr,
vm_addr: 0x100000000,
len: 32,
vm_addr_end: 0x100000000_u64.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
}],
Expand Down Expand Up @@ -2656,27 +2667,31 @@ mod tests {
host_addr: bytes_to_hash.as_ptr() as *const _ as u64,
vm_addr: ro_va,
len: 32,
vm_addr_end: ro_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: hash_result.as_ptr() as *const _ as u64,
vm_addr: rw_va,
len: HASH_BYTES as u64,
vm_addr_end: rw_va.saturating_add(HASH_BYTES as u64),
vm_gap_shift: 63,
is_writable: true,
},
MemoryRegion {
host_addr: bytes1.as_ptr() as *const _ as u64,
vm_addr: bytes_to_hash[0].vm_addr,
len: bytes1.len() as u64,
vm_addr_end: bytes_to_hash[0].vm_addr.saturating_add(bytes1.len() as u64),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: bytes2.as_ptr() as *const _ as u64,
vm_addr: bytes_to_hash[1].vm_addr,
len: bytes2.len() as u64,
vm_addr_end: bytes_to_hash[1].vm_addr.saturating_add(bytes2.len() as u64),
vm_gap_shift: 63,
is_writable: false,
},
Expand Down Expand Up @@ -2796,13 +2811,15 @@ mod tests {
host_addr: valid_bytes.as_ptr() as *const _ as u64,
vm_addr: valid_bytes_va,
len: 32,
vm_addr_end: valid_bytes_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: invalid_bytes.as_ptr() as *const _ as u64,
vm_addr: invalid_bytes_va,
len: 32,
vm_addr_end: invalid_bytes_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
Expand Down Expand Up @@ -2893,13 +2910,15 @@ mod tests {
host_addr: valid_bytes.as_ptr() as *const _ as u64,
vm_addr: valid_bytes_va,
len: 32,
vm_addr_end: valid_bytes_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: invalid_bytes.as_ptr() as *const _ as u64,
vm_addr: invalid_bytes_va,
len: 32,
vm_addr_end: invalid_bytes_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
Expand Down Expand Up @@ -3003,34 +3022,39 @@ mod tests {
host_addr: left_point.as_ptr() as *const _ as u64,
vm_addr: left_point_va,
len: 32,
vm_addr_end: left_point_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: right_point.as_ptr() as *const _ as u64,
vm_addr: right_point_va,
len: 32,
vm_addr_end: right_point_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: scalar.as_ptr() as *const _ as u64,
vm_addr: scalar_va,
len: 32,
vm_addr_end: scalar_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: invalid_point.as_ptr() as *const _ as u64,
vm_addr: invalid_point_va,
len: 32,
vm_addr_end: invalid_point_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: result_point.as_ptr() as *const _ as u64,
vm_addr: result_point_va,
len: 32,
vm_addr_end: result_point_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: true,
},
Expand Down Expand Up @@ -3210,34 +3234,39 @@ mod tests {
host_addr: left_point.as_ptr() as *const _ as u64,
vm_addr: left_point_va,
len: 32,
vm_addr_end: left_point_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: right_point.as_ptr() as *const _ as u64,
vm_addr: right_point_va,
len: 32,
vm_addr_end: right_point_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: scalar.as_ptr() as *const _ as u64,
vm_addr: scalar_va,
len: 32,
vm_addr_end: scalar_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: invalid_point.as_ptr() as *const _ as u64,
vm_addr: invalid_point_va,
len: 32,
vm_addr_end: invalid_point_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: result_point.as_ptr() as *const _ as u64,
vm_addr: result_point_va,
len: 32,
vm_addr_end: result_point_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: true,
},
Expand Down Expand Up @@ -3433,27 +3462,31 @@ mod tests {
host_addr: scalars.as_ptr() as *const _ as u64,
vm_addr: scalars_va,
len: 64,
vm_addr_end: scalars_va.saturating_add(64),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: edwards_points.as_ptr() as *const _ as u64,
vm_addr: edwards_points_va,
len: 64,
vm_addr_end: edwards_points_va.saturating_add(64),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: ristretto_points.as_ptr() as *const _ as u64,
vm_addr: ristretto_points_va,
len: 64,
vm_addr_end: ristretto_points_va.saturating_add(64),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: result_point.as_ptr() as *const _ as u64,
vm_addr: result_point_va,
len: 32,
vm_addr_end: result_point_va.saturating_add(32),
vm_gap_shift: 63,
is_writable: true,
},
Expand Down Expand Up @@ -3590,6 +3623,7 @@ mod tests {
host_addr: &got_clock as *const _ as u64,
vm_addr: got_clock_va,
len: size_of::<Clock>() as u64,
vm_addr_end: got_clock_va.saturating_add(size_of::<Clock>() as u64),
vm_gap_shift: 63,
is_writable: true,
}],
Expand Down Expand Up @@ -3630,6 +3664,8 @@ mod tests {
host_addr: &got_epochschedule as *const _ as u64,
vm_addr: got_epochschedule_va,
len: size_of::<EpochSchedule>() as u64,
vm_addr_end: got_epochschedule_va
.saturating_add(size_of::<EpochSchedule>() as u64),
vm_gap_shift: 63,
is_writable: true,
}],
Expand Down Expand Up @@ -3671,6 +3707,7 @@ mod tests {
host_addr: &got_fees as *const _ as u64,
vm_addr: got_fees_va,
len: size_of::<Fees>() as u64,
vm_addr_end: got_fees_va.saturating_add(size_of::<Fees>() as u64),
vm_gap_shift: 63,
is_writable: true,
}],
Expand Down Expand Up @@ -3707,6 +3744,7 @@ mod tests {
host_addr: &got_rent as *const _ as u64,
vm_addr: got_rent_va,
len: size_of::<Rent>() as u64,
vm_addr_end: got_rent_va.saturating_add(size_of::<Rent>() as u64),
vm_gap_shift: 63,
is_writable: true,
}],
Expand Down Expand Up @@ -3758,27 +3796,32 @@ mod tests {
host_addr: mock_slices.as_ptr() as u64,
vm_addr: SEEDS_VA,
len: (seeds.len().saturating_mul(size_of::<MockSlice>()) as u64),
vm_addr_end: SEEDS_VA
.saturating_add(seeds.len().saturating_mul(size_of::<MockSlice>()) as u64),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: program_id.as_ref().as_ptr() as u64,
vm_addr: PROGRAM_ID_VA,
len: 32,
vm_addr_end: PROGRAM_ID_VA.saturating_add(32),
vm_gap_shift: 63,
is_writable: false,
},
MemoryRegion {
host_addr: address.as_ref().as_ptr() as u64,
vm_addr: ADDRESS_VA,
len: 32,
vm_addr_end: ADDRESS_VA.saturating_add(32),
vm_gap_shift: 63,
is_writable: true,
},
MemoryRegion {
host_addr: &bump_seed as *const u8 as u64,
vm_addr: BUMP_SEED_VA,
len: 32,
vm_addr_end: BUMP_SEED_VA.saturating_add(32),
vm_gap_shift: 63,
is_writable: true,
},
Expand All @@ -3795,6 +3838,7 @@ mod tests {
host_addr: seed.as_ptr() as u64,
vm_addr,
len: seed.len() as u64,
vm_addr_end: vm_addr.saturating_add(seed.len() as u64),
vm_gap_shift: 63,
is_writable: false,
});
Expand Down Expand Up @@ -3972,6 +4016,7 @@ mod tests {
host_addr: memory.as_mut_ptr() as u64,
vm_addr: VM_BASE_ADDRESS,
len: END_OFFSET as u64,
vm_addr_end: VM_BASE_ADDRESS.saturating_add(END_OFFSET as u64),
vm_gap_shift: 63,
is_writable: true,
}],
Expand Down
4 changes: 2 additions & 2 deletions programs/sbf/Cargo.lock

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

2 changes: 1 addition & 1 deletion programs/sbf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ solana-sbf-rust-realloc = { path = "rust/realloc", version = "=1.16.0" }
solana-sbf-rust-realloc-invoke = { path = "rust/realloc_invoke", version = "=1.16.0" }
solana-sdk = { path = "../../sdk", version = "=1.16.0" }
solana-transaction-status = { path = "../../transaction-status", version = "=1.16.0" }
solana_rbpf = "=0.2.38"
solana_rbpf = "=0.2.39"

[dev-dependencies]
solana-ledger = { path = "../../ledger", version = "=1.16.0" }
Expand Down
Loading

0 comments on commit 4bfcbf7

Please sign in to comment.