mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Merge #291
291: fix alignment check on pointer r=MarkMcCaskey a=MarkMcCaskey Co-authored-by: Mark McCaskey <mark@wasmer.io>
This commit is contained in:
commit
ad897b2076
@ -19,9 +19,9 @@ jobs:
|
||||
name: Install lint deps
|
||||
command: |
|
||||
git config --global --unset url."ssh://git@github.com".insteadOf || true
|
||||
rustup toolchain install nightly
|
||||
rustup toolchain install nightly-2019-02-27
|
||||
rustup component add rustfmt
|
||||
rustup component add clippy --toolchain=nightly || cargo +nightly install --git https://github.com/rust-lang/rust-clippy/ --force clippy
|
||||
rustup component add clippy --toolchain=nightly-2019-02-27 || cargo +nightly-2019-02-27 install --git https://github.com/rust-lang/rust-clippy/ --force clippy
|
||||
- run:
|
||||
name: Execute lints
|
||||
command: |
|
||||
@ -272,7 +272,7 @@ jobs:
|
||||
sudo apt-get install -y cmake
|
||||
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
|
||||
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
|
||||
- run: rustup default nightly
|
||||
- run: rustup default nightly-2019-02-27
|
||||
- run: |
|
||||
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
|
||||
make test
|
||||
|
2
Makefile
2
Makefile
@ -28,7 +28,7 @@ integration-tests: release
|
||||
|
||||
lint:
|
||||
cargo fmt --all -- --check
|
||||
cargo +nightly clippy --all
|
||||
cargo +nightly-2019-02-27 clippy --all
|
||||
|
||||
precommit: lint test
|
||||
|
||||
|
@ -266,7 +266,7 @@ pub fn ___syscall140(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
|
||||
let ret = unsafe { lseek(fd, offset, whence) as i32 };
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
let result_ptr = emscripten_memory_pointer!(ctx.memory(0), result_ptr_value) as *mut i32;
|
||||
assert_eq!(4, mem::align_of_val(&result_ptr));
|
||||
assert_eq!(8, mem::align_of_val(&result_ptr));
|
||||
unsafe {
|
||||
*result_ptr = ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user