Upgrade to Rust 1.55.0
This commit is contained in:
parent
00929f8363
commit
3b70cdb8d8
|
@ -1,4 +1,4 @@
|
|||
FROM solanalabs/rust:1.54.0
|
||||
FROM solanalabs/rust:1.55.0
|
||||
ARG date
|
||||
|
||||
RUN set -x \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Note: when the rust version is changed also modify
|
||||
# ci/rust-version.sh to pick up the new image tag
|
||||
FROM rust:1.54.0
|
||||
FROM rust:1.55.0
|
||||
|
||||
# Add Google Protocol Buffers for Libra's metrics library.
|
||||
ENV PROTOC_VERSION 3.8.0
|
||||
|
@ -14,11 +14,10 @@ RUN set -x \
|
|||
&& apt update \
|
||||
&& apt install -y \
|
||||
buildkite-agent \
|
||||
clang-7 \
|
||||
clang \
|
||||
cmake \
|
||||
lcov \
|
||||
libudev-dev \
|
||||
libclang-common-7-dev \
|
||||
mscgen \
|
||||
net-tools \
|
||||
rsync \
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
if [[ -n $RUST_STABLE_VERSION ]]; then
|
||||
stable_version="$RUST_STABLE_VERSION"
|
||||
else
|
||||
stable_version=1.54.0
|
||||
stable_version=1.55.0
|
||||
fi
|
||||
|
||||
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
|
||||
nightly_version="$RUST_NIGHTLY_VERSION"
|
||||
else
|
||||
nightly_version=2021-08-02
|
||||
nightly_version=2021-10-05
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -477,51 +477,27 @@ fn process_instruction(
|
|||
let owner = *accounts[FROM_INDEX].owner;
|
||||
let ptr = accounts[FROM_INDEX].data.borrow().as_ptr() as u64 as *mut _;
|
||||
let len = accounts[FROM_INDEX].data_len();
|
||||
let mut data = unsafe { std::slice::from_raw_parts_mut(ptr, len) };
|
||||
let data = unsafe { std::slice::from_raw_parts_mut(ptr, len) };
|
||||
let mut lamports = accounts[FROM_INDEX].lamports();
|
||||
let from_info = AccountInfo::new(
|
||||
&pubkey,
|
||||
false,
|
||||
true,
|
||||
&mut lamports,
|
||||
&mut data,
|
||||
&owner,
|
||||
false,
|
||||
0,
|
||||
);
|
||||
let from_info =
|
||||
AccountInfo::new(&pubkey, false, true, &mut lamports, data, &owner, false, 0);
|
||||
|
||||
let pubkey = *accounts[DERIVED_KEY1_INDEX].key;
|
||||
let owner = *accounts[DERIVED_KEY1_INDEX].owner;
|
||||
// Point to top edge of heap, attempt to allocate into unprivileged memory
|
||||
let mut data = unsafe { std::slice::from_raw_parts_mut(0x300007ff8 as *mut _, 0) };
|
||||
let data = unsafe { std::slice::from_raw_parts_mut(0x300007ff8 as *mut _, 0) };
|
||||
let mut lamports = accounts[DERIVED_KEY1_INDEX].lamports();
|
||||
let derived_info = AccountInfo::new(
|
||||
&pubkey,
|
||||
false,
|
||||
true,
|
||||
&mut lamports,
|
||||
&mut data,
|
||||
&owner,
|
||||
false,
|
||||
0,
|
||||
);
|
||||
let derived_info =
|
||||
AccountInfo::new(&pubkey, false, true, &mut lamports, data, &owner, false, 0);
|
||||
|
||||
let pubkey = *accounts[SYSTEM_PROGRAM_INDEX].key;
|
||||
let owner = *accounts[SYSTEM_PROGRAM_INDEX].owner;
|
||||
let ptr = accounts[SYSTEM_PROGRAM_INDEX].data.borrow().as_ptr() as u64 as *mut _;
|
||||
let len = accounts[SYSTEM_PROGRAM_INDEX].data_len();
|
||||
let mut data = unsafe { std::slice::from_raw_parts_mut(ptr, len) };
|
||||
let data = unsafe { std::slice::from_raw_parts_mut(ptr, len) };
|
||||
let mut lamports = accounts[SYSTEM_PROGRAM_INDEX].lamports();
|
||||
let system_info = AccountInfo::new(
|
||||
&pubkey,
|
||||
false,
|
||||
false,
|
||||
&mut lamports,
|
||||
&mut data,
|
||||
&owner,
|
||||
true,
|
||||
0,
|
||||
);
|
||||
let system_info =
|
||||
AccountInfo::new(&pubkey, false, false, &mut lamports, data, &owner, true, 0);
|
||||
|
||||
let instruction = system_instruction::create_account(
|
||||
accounts[FROM_INDEX].key,
|
||||
|
|
|
@ -895,6 +895,7 @@ pub mod tests {
|
|||
// assert_eq! thinks *executable_bool is equal to false but the if condition thinks it's not, contradictorily.
|
||||
assert!(!*executable_bool);
|
||||
const FALSE: bool = false; // keep clippy happy
|
||||
#[allow(clippy::if_then_panic)]
|
||||
if *executable_bool == FALSE {
|
||||
panic!("This didn't occur if this test passed.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue