Skip to content

Commit 17d200f

Browse files
authored
Downgrade memoffset dependency (#1526)
* Downgrade `memoffset` dependency The 0.9.1 version doesn't build on OSS-Fuzz with the pinned version of a nightly that's being used. * Specifically test libdl with Rust 1.77
1 parent 5636e57 commit 17d200f

4 files changed

Lines changed: 23 additions & 9 deletions

File tree

.github/workflows/main.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@ jobs:
8484
submodules: true
8585
- name: Install Rust (rustup)
8686
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
87-
- run: |
88-
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0-linux.tar.gz
89-
tar xf wasi-sdk-21.0-linux.tar.gz
90-
export WASI_SDK_PATH=$(pwd)/wasi-sdk-21.0
91-
rustup target add wasm32-wasi
92-
cd crates/wit-component/dl && bash check.sh
93-
if: matrix.os == 'ubuntu-latest' && matrix.build == 'stable'
9487
- run: cargo test --locked --all
9588
- run: cargo test --locked -p wasmparser --benches
9689
- run: cargo test --locked -p wasm-encoder --all-features
@@ -100,6 +93,22 @@ jobs:
10093
- run: cmake -S examples -B examples/build -DCMAKE_BUILD_TYPE=Release
10194
- run: cmake --build examples/build --config Release
10295

96+
testdl:
97+
name: Test libdl.so
98+
runs-on: ubuntu-latest
99+
steps:
100+
- uses: actions/checkout@v4
101+
with:
102+
submodules: true
103+
- name: Install Rust (rustup)
104+
run: rustup update 1.77.0 --no-self-update && rustup default 1.77.0
105+
- run: |
106+
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0-linux.tar.gz
107+
tar xf wasi-sdk-21.0-linux.tar.gz
108+
export WASI_SDK_PATH=$(pwd)/wasi-sdk-21.0
109+
rustup target add wasm32-wasi
110+
cd crates/wit-component/dl && bash check.sh
111+
103112
wasm:
104113
name: Test on WebAssembly
105114
runs-on: ubuntu-latest
@@ -213,6 +222,7 @@ jobs:
213222
runs-on: ubuntu-latest
214223
needs:
215224
- test
225+
- testdl
216226
- wasm
217227
- rustfmt
218228
- fuzz

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/wit-component/dl/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#
66
# Example: WASI_SDK_PATH=/opt/wasi-sdk bash build.sh ../libdl.so
77

8+
set -ex
9+
810
CARGO_PROFILE_RELEASE_LTO=true RUSTFLAGS="-C relocation-model=pic" cargo build --release --target=wasm32-wasi
911
$WASI_SDK_PATH/bin/clang -shared -o $1 -Wl,--whole-archive ../../../target/wasm32-wasi/release/libdl.a -Wl,--no-whole-archive
1012
cargo run --manifest-path ../../../Cargo.toml -- strip $1 -o $1

crates/wit-component/dl/check.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
set -ex
2+
13
bash ./build.sh ../../../target/wasm32-wasi/release/tmp.so
24
if diff ../../../target/wasm32-wasi/release/tmp.so ../libdl.so; then
35
exit 0

0 commit comments

Comments
 (0)