Commit ec3f6344 authored by Inphi's avatar Inphi Committed by GitHub

ci: Sanitize op-program for unsupported instructions (#12007)

parent 0fee34b6
...@@ -1048,6 +1048,9 @@ jobs: ...@@ -1048,6 +1048,9 @@ jobs:
- restore_cache: - restore_cache:
name: Restore cannon prestate cache name: Restore cannon prestate cache
key: cannon-prestate-{{ checksum "./cannon/bin/cannon" }}-{{ checksum "op-program/bin/op-program-client.elf" }} key: cannon-prestate-{{ checksum "./cannon/bin/cannon" }}-{{ checksum "op-program/bin/op-program-client.elf" }}
- run:
name: Sanitize op-program guest
command: make -f cannon/Makefile sanitize-program GUEST_PROGRAM=op-program/bin/op-program-client.elf
- run: - run:
name: generate cannon prestate name: generate cannon prestate
command: make cannon-prestate command: make cannon-prestate
......
...@@ -22,6 +22,14 @@ clean: ...@@ -22,6 +22,14 @@ clean:
elf: elf:
make -C ./testdata/example elf make -C ./testdata/example elf
sanitize-program:
@if ! { mips-linux-gnu-objdump -d -j .text $$GUEST_PROGRAM | awk '{print $3}' | grep -Ew -m1 '(bgezal|bltzal)'; }; then \
echo "guest program is sanitized for unsupported instructions"; \
else \
echo "found unsupported instructions in the guest program"; \
exit 1; \
fi
contract: contract:
cd ../packages/contracts-bedrock && forge build cd ../packages/contracts-bedrock && forge build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment